WASHINGTON — The U.S. trade deficit rose to $50.5 billion in November, the largest imbalance in nearly six years, as imports and exports both hit records.

The November deficit was 3.2 percent higher than October's $48.9 billion imbalance, the Commerce Department reported Friday. U.S. exports of goods and services were up 2.3 percent to an all-time high of $200.2 billion. Imports rose an even faster 2.5 percent to a record $250.7 billion.

A rising trade deficit, which reduces economic growth, means that the United States is buying more goods and services from other countries than it is selling them. President Donald Trump views America's massive trade deficits as a sign of economic weakness. He blames them on bad trade deals and abusive practices by China and other trade partners.

The politically sensitive deficit with China rose to $35.4 billion in November, the biggest goods deficit that the United States runs with any country and the largest monthly deficit with China since September 2015.

RELATED | Trump unveils national security plan, focus on economy

The overall deficit in November in goods and services was the largest since January 2012. Through the first 11 months of 2017, the monthly deficits total $513.6 billion, 11.6 percent above the deficit total for the same period in 2016. The United States had run up a $737.4 billion deficit in goods trade through November and had a $223.8 billion surplus in trade in services such as tourism and banking.

Trump contends that the major tax cut legislation Congress approved last month will help reduce the deficits by encouraging companies to bring production back to the United States. He has also vowed tougher enforcement of U.S. trade laws by imposing penalty tariffs on foreign goods from countries that are using unfair practices to compete against American workers and companies.

Trump has pledged to renegotiate what he sees as bad trade deals such as the North American Free Trade Agreement with Canada and Mexico, and go after countries he believes have rigged the global trade system to their advantage. But many private economists argue that trade deficits are largely caused not by flawed trade agreements or cheating by particular countries but by a bigger economic force — Americans spend more than they produce, and imports have to fill in the gap.