Almost a year ago, after heavy criticism from President-elect Donald J. Trump, Ford Motor Company canceled plans to build a $1.6 billion car plant in Mexico and announced that it would instead equip a Michigan factory to make electric and hybrid models.

Now the automaker is changing its plans again, saying it intends to assemble new battery-powered cars in Mexico, not Michigan. But the Michigan location will get an even larger investment than previously planned and will focus on making a range of self-driving cars.

The switch comes as the Trump administration has been pushing to renegotiate the North American Free Trade Agreement with Canada and Mexico. Few industries are more heavily affected by the accord than the auto sector, which has rushed to build plants in Mexico over the last several years to take advantage of lower labor costs and that country’s extensive network of trade agreements.

Late last month, Vice President Mike Pence met with top executives from Ford, General Motors and Fiat Chrysler to discuss trade and the renegotiation effort.