WASHINGTON (Reuters) - The U.S. trade deficit fell in December as exports hit their highest level in more than 1-1/2 years amid record shipments of technology products, but strengthening domestic demand points to further rises in imports, which could constrain economic growth.

The Commerce Department said on Tuesday the trade gap dropped 3.2 percent to $44.3 billion, ending two straight months of increases. The trade deficit rose 0.4 percent to a four-year high of $502.3 billion in 2016. That represented 2.7 percent of gross domestic product, down from 2.8 percent in 2015.

When adjusted for inflation, the deficit decreased to $62.3 billion from $63.9 billion in November.

President Donald Trump has blamed U.S. trade policy for the loss of American factory jobs and has vowed to make sweeping changes, starting with pulling out of the 12-nation Trans-Pacific Partnership trade pact.

Trump also wants to renegotiate the North American Free Trade Agreement, which was signed in 1994 by the United States, Canada and Mexico. But economists do not believe these protectionist measures will eliminate the deficit.

“When an economy is at full employment, an acceleration in demand tends to be accompanied by a pickup in import growth and a wider trade deficit,” said John Ryding, chief economist at RDQ Economics in New York. “The U.S. simply does not have enough spare labor and capacity at any exchange rate to close the deficit, which will likely widen in 2017 and 2018.”

U.S. financial markets were little moved by the report as the government published an estimate of the goods deficit last month. Trade slashed 1.7 percentage points from gross domestic product in the fourth quarter, leaving output rising at a 1.9 percent annualized rate.

The economy grew at a 3.5 percent pace in the third quarter. The improvement in the deficit at the end of the year could set up trade to be a modest drag on growth in the first quarter.

In December, exports of goods and services increased 2.7 percent to $190.7 billion, the highest since April 2015, as shipments of advanced technology goods such as aerospace, biotechnology and electronics, hit a record high.

FFreighters and cargo containers sit idle at the Port of Los Angeles as a back-log of over 30 container ships sit anchored outside the Port in Los Angeles, California, February 18, 2015.. REUTERS/Bob Riha, Jr./File Photo

There were increases in exports of industrial supplies and materials, capital goods, consumer goods and motor vehicles.

SWEEPING FLOORS

“Exports are jumping, which should increase those factory hours and bring back a few workers to sweep the shop floors while the robots toil away,” said Chris Rupkey, chief economist at MUFG Union Bank in New York.

“All the protectionism and slapping import duties on goods coming in the U.S. is probably not going to gain us the additional jobs that are being hoped for.”

Despite December’s rebound, exports remain constrained by relentless dollar strength. The dollar gained 4.4 percent against the currencies of the United States’ main trading partners in 2016. Some of that impact will still be felt early this year.

Last week in remarks to a meeting with pharmaceutical executives, Trump reiterated his view that the trade deficit is at least partly the result of other countries, especially China and Japan, devaluing their currencies to gain a trade advantage.

“A trade deficit is erroneously associated with ... stealing our jobs and is seen as the product of currency manipulation,” said RDQ Economics’ Ryding.

“The trade deficit of $502 billion in 2016 could not be eliminated by a weaker dollar or a tariff wall on foreign imports. The most effective way to close a trade gap is to engineer a recession to deflate the demand for imports.”

Exports to the European Union jumped 10.1 percent, with goods shipped to Germany surging 12.4 percent. Germany has also come under criticism from some Trump advisers. Exports to China, another sore point for Trump, fell 4.1 percent.

Imports of goods and services rose 1.5 percent to $235.0 billion in December, the highest level since March 2015. Part of the increase in the import bill reflects higher oil prices, as well as strengthening domestic demand.

The price of imported crude oil averaged $41.45 in December, the highest since September 2015. Food imports hit a record high, as did those of motor vehicles.

Imports of goods from China fell 7.6 percent in December, while those from Germany rose 1.4 percent.

With both exports and imports falling, the politically sensitive U.S.-China trade deficit dropped 9.0 percent to $27.8 billion in December. The trade deficit with China decreased $20.1 billion to $347.0 billion in 2016.

The trade gap with Germany declined 6.2 percent to $5.3 billion in December. The trade deficit with Germany narrowed $10.0 billion to $64.9 billion last year. The United States also saw big declines in its trade deficits with Canada and Mexico in December.