FLAT ROCK, Mich. -- The auto industry's relationship with President-elect Donald Trump took a dramatic turn Tuesday as Ford Motor Co. decided to shift investment dollars targeted for Mexico to the U.S., while Trump threatened General Motors with a tax on some imported small cars.

Ford is cancelling plans to build a new $1.6 billion factory in San Luis Potosi, Mexico, and will instead invest some of that money in a U.S. factory that will build new electric and autonomous vehicles.

Ford said last spring it would move production of the Ford Focus small car to the new plant from Michigan. Trump repeatedly criticized the plan, and Ford was among the companies he threatened to hit with a 35 per cent tariff on products made in Mexico and exported to the U.S.

Trump added General Motors to that group Tuesday, saying in a tweet that the Cruze small cars GM makes in Mexico and sends to U.S. dealers could face "a big border tax!"

Ford CEO Mark Fields said Tuesday that market forces dictated Ford's decision not to build the San Luis Potosi plant. Low gas prices and low interest rates have been hammering small-car sales. U.S. sales of the Focus were down 17 per cent through November; by contrast, sales of Ford's biggest SUV, the Expedition, were up 46 per cent.

Ford will still move production of the Focus to Mexico, but it will go to an existing plant in Hermosillo that makes midsize cars. Ford will hire around 200 workers in Hermosillo to expand production there. The Wayne, Michigan, plant that currently makes the Focus will get two new products next year, preserving jobs at the facility.

Fields said Ford will invest $700 million in the Flat Rock plant to make hybrid, electric and autonomous vehicles. It will also hire around 700 workers starting in 2018. In announcing the Michigan expansion, Fields noted Trump's promise to make the U.S. more competitive by lowering taxes and easing regulations.

"This is a vote of confidence for President-elect Trump and some of the policies he may be pursuing," Fields said at the company's plant in Flat Rock.

Workers lined up on the factory floor cheered the news. United Auto Workers Vice-President Jimmy Settles, the union's chief negotiator for Ford, told workers he cried when he heard about the investment. Flat Rock, which employs around 3,200 people, was threatened with closure during the recession. More recently, it has seen temporary layoffs because of slowing sales of one of its products, the Ford Mustang. The plant also makes the Lincoln Continental.

Fields said Ford Executive Chairman Bill Ford called Trump Tuesday morning to tell him the news. Fields called Vice-President-elect Mike Pence. The company also contacted the Mexican government, which issued a statement regretting Ford's decision.

"The jobs created in Mexico have contributed to maintaining manufacturing jobs in the United States which otherwise would have disappeared in the face of Asian competition," the Mexico Economy Department said.

Fields said Ford will save around $500 million overall by cancelling the San Luis Potosi plant. It expects to get some tax incentives from the state of Michigan.

Rebecca Lindland, a senior analyst for Kelley Blue Book, said Ford's decision stemmed from the convergence of politics and market realities. At the same time Trump was attacking Ford for shifting small-car production south of the border, U.S. demand for small cars plunged dramatically.

"If the business case is there to make this decision, and then it can make somebody like Donald Trump look better, OK, go with it," she said.

Ford might not have changed its plans if Hillary Clinton had been elected, Lindland said. Unlike Trump, Clinton never threatened to tax imports from Mexico.

Trump issued his threat to GM just hours before Ford's announcement. GM countered that Cruze sedans sold in the U.S. are built in Ohio. Only a small number of Cruze hatchbacks are imported to the U.S. from Mexico.

Fields said he's not worried about the possibility of tariffs.

"I'm a strong believer that the right policies are going to prevail because we share the same aspirations that I think President-elect Trump does. We want a very strong U.S. economy," he said.

Among the new vehicles the Flat Rock plant will make is a fully electric SUV that will go 300 miles on a charge. That is due to go on sale in 2020. The plant also will make a hybrid autonomous vehicle that is scheduled to be released in 2021.

Ford also said Tuesday it will release a hybrid version of its bestseller, the F-150 pickup, and a hybrid version of the Mustang in 2020. Two new hybrid police vehicles also are coming over the next five years.

Fields said the company is betting that electric and hybrid vehicle offerings will outnumber traditional gas-powered vehicles in 15 years.

Trump may relax government fuel economy standards as part of his initiative to dilute some regulations. But Ford still needs to move headlong into electric and hybrid vehicles because it still has to meet California zero-emission vehicle requirements and comply with emissions standards worldwide, Lindland said.

"All these worlds are colliding to make an announcement like we saw today from Ford possible," she said.

Ford shares rose nearly 4 per cent to close at $12.59 Tuesday, while GM shares rose less than 1 per cent to $35.15. The Mexican peso weakened against the U.S. dollar after the announcement.

AP Writer Peter Orsi contributed from Mexico City.