Ford will build its next generation all-electric car in Mexico, rather than at the plant in Michigan where it promised to build it.

The automaker announced in January that it would invest $700 million and create 700 jobs at a plant in Flat Rock, Michigan to build EV's, and that it would scrap plans for a new small car plant in Mexico.

The news was celebrated by the incoming Trump administration, which claimed that it had convinced U.S. automakers to bring jobs home.

Mark Fields, Ford's CEO at the time, referred to the plans for the Michigan plant as a "vote of confidence" in the Trump administration.

Related: Why Trump has automakers worried about NAFTA

The company says it will still go ahead with plans to invest and create new jobs at Flat Rock, but that it will build self-driving cars there instead, rather than electric cars.

In fact it now expects to have 850 jobs there, rather than 700. And it has boosted the planned investment in the Michigan plant to $900 million, rather than its $700 million target.

The company, along with every other automaker, is making a major push into self-driving car technology. That's one reason it tapped Jim Hackett, who previously led Ford's self-driving car effort, as CEO when Fields was forced out earlier this year.

Market Sectors: See latest news & which stock market segments are performing best

The company will produce the electric cars at its existing Mexican plant in Cuautitlan starting in 2020, but that it won't add any jobs there. Ford currently builds the Fiesta there, which isn't very popular.

"We have excess capacity at that plant," said Ford spokeswoman Kelli Felker.

Ford is also trying to play catch-up on electric cars. It has only one all-electric vehicle, and it is not competitive with either GM's (GENERAL MOTORS) Chevy Bolt or the Tesla (TSLA) Model 3, which each cost about $35,000 and can go more than 200 miles on a single charge.

Related: Ford workers are testing out exoskeletons

Moving electric car production to Mexico could lower the cost of the making the cars, which have been money losers for every automaker so far. But it also entails the risk that the Trump administration could put steep taxes on new cars built in Mexico as it seeks to renegotiate the NAFTA trade deal.

Ford is also moving ahead with plans to build all of its small cars for the U.S market at existing facilities in either Mexico or China, and to keep its U.S. plants building larger, more profitable vehicles. It won't shut down any U.S. production. It scrapped plans for a new small car plant in Mexico because demand for them is so weak, not to shift any manufacturing back to the U.S.

All the major automakers make some of their cars for the U.S. market in Mexico, and all depend on Mexican parts suppliers for cars built at U.S. plants. The automakers met with Vice President Mike Pence recently to express concerns about moving away from NAFTA.