Ford has cancelled its plan to build a $1.6bn plant in Mexico, announcing the move just hours after US President-elect Donald Trump took to Twitter and criticized Ford’s rival General Motors for importing some of its cars made in Mexico to the US.

Ford said in a statement it is scrapping plans for the new plant in San Luis Potosi and instead will invest $700m in a factory in Michigan to build electric vehicles.

In an interview with CNN, Ford CEO Mark Fields described the decision as a “vote of confidence” in Trump’s economic plans and stressed the company did not make its decision based on any deal with the incoming administration.

“We didn’t cut a deal with the president-elect. We did what’s right for our business,” Fields said. “It’s a vote of confidence around some of the pro-growth policies that he has been outlining, and that’s why we’re making this decision.”

Earlier on Tuesday, Trump criticized GM in a tweet, saying “General Motors is sending Mexican made model of Chevy Cruze to U.S. car dealers- tax free across the border. Make in U.S.A or pay big border tax!”

Field said Ford will now manufacture its Focus model, which was originally set to be produced at the San Luis Potosi plant, at an existing factory in Mexico. He also said the decision to scrap the plant was in response to a changing US market. “We’re seeing a decline in demand for small vehicles in America,” he said.

Ford has been a frequent target of criticism from Trump, who repeatedly lashed out at the company on the campaign trail over its plans to build the new Mexico facility. He has regularly called for an overhaul of the North American Free Trade Agreement (NAFTA) and suggested a need for higher tariffs on companies who move production out of the US and sell their products back to the American market.

Uncertainty over the plans of the incoming Trump administration and its approach to US-Mexico trade relations have weighed on the Mexican economy, weakening the peso currency in recent months.

Mexican government officials did not immediately comment on Ford’s decision.

In a statement, GM said only a “small number” of its Cruze models are made in Mexico and sold in the United States. “All Chevrolet Cruze sedans sold in the US are built in GM’s assembly plant in Lordstown, Ohio,” the carmaker said. “GM builds the Chevrolet Cruze hatchback for global markets in Mexico, with a small number sold in the US.”