Ford will shift production of the Focus compact car from the United States to China. And in a first for the automaker, it will ship many of these cars back to the U.S. to sell.

But the move is more bad news for Mexico than it is for the United States. While the Focus has been built at the Michigan Assembly plant in Wayne, Michigan for years, Ford (F) had previously announced plans to shift its production to Mexico. Ford (F) wants to make room for larger, more profitable vehicles at the Michigan plant, which employs 3,600. The factory won't lose any jobs as a result of the move.

Ford will start building its new small pickup, the Ranger, in 2018, after the Focus moves to China. In 2020, it will build the new Bronco, the SUV model it is bringing back, at the Michigan plant.

Related: Ford offers buyouts to 15,000 factory workers

Ford also said Tuesday that it will invest $900 million in its Kentucky truck plant to build the new versions of the Ford Expedition and Lincoln Navigator, there. It said that investment would protect 1,000 jobs at that plant.

But the company's decision to shift production of small cars to Mexico became a hot-button issue during last year's presidential campaign, when then-candidate Donald Trump repeatedly attacked the company' for exporting jobs from the United States. He even falsely accused Ford of planning to shift all of its auto production and jobs to Mexico.

In January, Ford announced that it had canceled plans to build a new plant in Mexico to build the Focus. Trump heralded that as a victory, even though Ford said it would still build the Focus in Mexico, just at an existing plant.

When asked about Ford's move Tuesday, White House press secretary Sean Spicer deferred to Commerce Secretary Wilbur Ross, who did not criticize the automaker.

"The Ford decision shows how flexible multinational companies are in terms of geography," Ross said in a statement. "I believe that as President Trump's policies and reforms take hold, more companies will begin to locate their facilities in the U.S."

Ford's plan to shift the Focus to China is a sign of the weak demand for small cars in the United States and of the growing importance of China, which is the largest autos market in the world. U.S. sales of the Focus are down 20% so far this year.

Related: Why Ford fired its CEO

China also is a very inexpensive place to make cars. Ford estimates it will save $500 million a year by building in China rather than at the Mexican plant it had been looking at.

"Building in China [for the U.S. market] will become more common," said Michelle Krebs, senior analyst for AutoTrader. "The small car market has fallen far more than any one anticipated. Ford needed to find a low-cost way to produce them. They're already making the Focus in China. This just made sense."

Ford is under great pressure to cut costs to shore up the billions of dollars it needs to invest in electric cars and self-driving vehicles. It recently announced plans to trim $3 billion in annual costs, including plans to cut 1,400 white collar jobs, and replaced its CEO.

Ford already makes the Focus at two different plants in China.

Only two other cars are currently built in China and exported to the United States -- the Buick Envision, and the Volvo S60 Inscription. But neither of those cars were ever built at a U.S. factory. The Envision has only been built in China, which is General Motors' largest market. And Volvo does not have a U.S. plant yet. That automaker, once owned by Ford, is now owned by Chinese automaker Geely.

--CNN's Jeremy Diamond contributed to this story.