Ford Motor Co. F, -0.28% said Tuesday it is canceling plans for a new $1.6 billion plant in San Luis Potosi, Mexico, and investing $700 million in its Flat Rock, Mich., plant's expansion, as part of a push into electric vehicles in the next five years. The news came just hours after President-elect Donald Trump tweeted at Ford rival General Motors Co. GM, +0.66% , saying the company needs to be taxed for certain versions of the Chevrolet Cruze small car that it imports from Mexico to U.S. dealers. Ford said it will add 700 jobs at the Michigan plant, which will build high-tech electric vehicles and self-driving cars, as well as the Mustang and Lincoln Continental. The moves are part of a planned $4.5 billion investment in electric vehicles by 2020 as the company works to become an auto and mobility company. Ford unveiled plans for seven global electric vehicles, including a small SUV offering a range of 300 or more miles. Ford shares jumped 2.4% on the news, while GM was up 0.8% and the S&P 500 SPX, -0.46% was up 0.5%.