Ford Motor said on Tuesday it plans to cancel production of a $1.6 billion plant in Mexico, and will instead invest $700 million in Flat Rock, Michigan.

The U.S. auto giant said it will add 700 direct new jobs in Flat Rock to produce high-tech electrified and autonomous vehicles, plus the Ford Mustang and Lincoln Continental.

Ford had originally planned to build its Ford Focus at a plant in San Luis Potosi, Mexico. The company said it will continue to build its Focus at an existing plant in Hermosillo, Mexico, to improve company profitability.

During the final weeks of the presidential campaign, President-elect Donald Trump slammed what he called Ford's "horrible" plans to move all small car production to Mexico within three years.

"It used to be cars were made in Flint and you couldn't drink the water in Mexico," he said in a September speech in Flint, Michigan. "Now the cars are made in Mexico, and you can't drink the water in Flint. That's not good."

He was referring to the lead water crisis in the the Michigan city.

Trump touted that he helped stop Ford from moving an entire factory from Kentucky to Mexico.

It is not clear how many jobs would have been impacted if the low-selling MKC had moved to Mexico.

On Tuesday, Trump attacked General Motors, saying the auto giant is making a Cruze model in Mexico and then sending them to U.S. dealers tax free. Trump had previously bragged about a deal with United Technologies unit Carrier to keep some jobs in Indiana.

A high level source within Ford stressed Trump had nothing to do with their decision to expand production and hire more employees, NBC News reports.

Ford's changes are a part its plan to become an auto and mobility company. The company said it will invest $4.5 billion in electrified vehicles by 2020.

"As more and more consumers around the world become interested in electrified vehicles, Ford is committed to being a leader in providing consumers with a broad range of electrified vehicles, services and solutions that make people's lives better," said Mark Fields, Ford president and CEO.

The electrified vehicles announced on Tuesday include, fully electric small SUV, coming by 2020 and a hybrid version of its best-selling F-150 pickup.