Ford Motor Co on Tuesday scrapped a planned Mexican car factory and added 700 jobs in Michigan following criticism by Donald Trump, as the U.S. president-elect turned his attention toward rival General Motors Co with the threat of a "big border tax" over compact cars made in Mexico.

Ford CEO Mark Fields called the move "a vote of confidence" in Trump, but primarily a response to a decline in North American demand for small cars like those that would have been made at the Mexican plant. He said Ford would have made the same decision even if Trump had not been elected.

Ford will cancel plans unveiled in April to spend $1.6 billion to build the new plant in San Luis Potosi, Mexico, a project Trump urged the automaker to abandon and called an "absolute disgrace" during the election campaign.

The No. 2 U.S. automaker also said it would invest $700 million to expand the Flat Rock, Michigan factory and would make new electric, hybrid and autonomous vehicles there.

Trump's efforts to browbeat the U.S. car industry show he may go further than other modern presidents to try to influence corporate decisions, especially those related to trade and investment.

In a Twitter post hours before Ford's announcement, Trump wrote, "General Motors is sending Mexican made model of Chevy Cruze to U.S. car dealers-tax free across border. Make in U.S.A. or pay big border tax!" GM, the largest U.S. automaker, said making some of the Cruze cars in the plant in Coahuila, Mexico was part of its strategy to serve global customers, not sell those vehicles in the United States.

Trump's GM tweet was his latest broadside aimed at an American company over jobs, imports and costs even before he takes office on Jan. 20.

Mexico's government said it regrets Ford's decision and has ensured that the company will reimburse San Luis Potosi state for any costs associated with the investment.

"Obviously, this isn't a good decision for us," said Mexico's economy minister, Ildefonso Guajardo.

Ford said it still will shift production from Michigan of its Focus compact car to an existing plant in Hermosillo, Mexico. Fields said he expects Michigan to give incentives for Ford's investment in Flat Rock.

Ford spokeswoman Jennifer Flake said the automaker will save $500 million by not opening the new plant in the near term, but will have some undisclosed costs to retool the other Mexican plant to build the Focus.

Ford shares closed up about 3.8 percent. GM shares rose about 0.9 percent.

TRUMP NOTIFIED

Top Ford executives personally notified Trump and Vice President-elect Mike Pence of their decision. Fields praised tax and regulatory proposals advocated by Trump and his fellow Republicans who control Congress.

"Our view is that we see a more positive U.S. manufacturing business environment under President-elect Trump and the pro-growth policies and proposals that he's talking about, so this is a vote of confidence for President-elect Trump and some of the policies that they may be pursuing," Fields said.

Union workers gathered at the Flat Rock factory cheered Fields' announcement. Hiring of the 700 new workers there will probably start in 2018 with the majority of it in 2020, Fields said.

Trump said during the presidential campaign that if elected he would not allow Ford to open the new plant in Mexico and would slap hefty tariffs on imported Ford vehicles. Trump also accused Mexico of sending criminals and rapists into the United States and vowed to build a border wall to combat illegal immigration.

Since winning the Nov. 8 election, Trump has targeted a wide range of American companies also including United Technologies Inc, Boeing Co and Lockheed Martin Corp Trump also has touted decisions by companies to keep some production in the United States, including United's Carrier unit in Indiana.

Trump previously vowed to hit companies that shift production from America to other countries with a 35 percent tax on their exports into the United States. He also has denounced the North American Free Trade Agreement between the United States, Mexico and Canada.

Fields said there were no negotiations between Ford and the incoming president over canceling the Mexico plant or investing in Michigan.

Ford will build a battery electric SUV with a 300-mile (482-km) driving range at the Michigan plant by 2020, and will launch production there by 2021 of a fully autonomous vehicle without a steering wheel or a brake pedal for use in ride services fleets. Ford also plans new hybrid versions of its F-150 pickup truck, Mustang and police vehicles by 2020.

GM said it sold about 190,000 Cruze cars in the United States in 2016. All of the sedan versions sold in the United States, about 185,500, were built at its Lordstown, Ohio plant. About 4,500 hatchback Cruze versions were assembled in Mexico and sold in the United States.