President-elect Donald Trump took credit Thursday night on Twitter for stopping Ford from moving jobs from Kentucky to Mexico.

The only problem with the claim? Ford had never said it planned to move its Louisville, Kentucky assembly plant to Mexico.

In fact, the automaker pledged last year, in a legally binding contract with the United Auto Workers union, to invest $700 million in Louisville, where it builds the popular Ford Escape.

Forget what Trump tweeted. Here's what really happened.

On Thursday, Ford (F) said it will keep production of the Lincoln MKC at the plant. It had planned to shift production of the MKC to another plant and Mexico was a likely location.

But even if Ford had shifted production of the MKC to Mexico, it planned to keep employment in Louisville near the current level of 4,700 workers.

The MKC, a luxury version of the Escape, is not a major product for Ford. The company sold 25,000 of them in the U.S. last year, compared to 306,000 for the Escape. This year's sales will be about the same.

Still, Ford's decision to keep the MKC in Kentucky was enough for the president-elect to take a victory lap on his favorite medium of Twitter on Thursday night.

"Just got a call from my friend Bill Ford, Chairman of Ford, who advised me that he will be keeping the Lincoln plant in Kentucky -- no Mexico," he tweeted.

"I worked hard with Bill Ford to keep the Lincoln plant in Kentucky. I owed it to the great State of Kentucky for their confidence in me!"

I worked hard with Bill Ford to keep the Lincoln plant in Kentucky. I owed it to the great State of Kentucky for their confidence in me! — Donald J. Trump (@realDonaldTrump) November 18, 2016

Ford had temporarily shut its Louisville plant the weeks of October 17 and October 31 due to slowing sales and excess inventory. That was standard operating procedure in the industry -- not a plan to move production to Mexico. And most of the 4,700 workers affected continued to receive 80% of their normal play during this temporary shutdown.

Ford reiterated Thursday that it has invested $12 billion in U.S. plants and added 28,000 American jobs in the past five years. That represents nearly a 50% increase in U.S. jobs at Ford during that period.

"Today, we confirmed with the President-elect that our small Lincoln utility vehicle made at the Louisville Assembly Plant will stay in Kentucky," said the statement. "We are encouraged that President-elect Trump and the new Congress will pursue policies that will improve U.S. competitiveness and make it possible to keep production of this vehicle here in the United States."

Related: Ford will be the first automaker to import cars to India to the U.S.

Ford's response to Trump was far more conciliatory than some of its statements before last week's vote.

In September, when Trump wrongly claimed Ford was planning to move all production to Mexico, Ford CEO Mark Fields came out and said he was flat out wrong about company plans.

"Absolutely not. Zero. Not one job will be lost. Most of our investment is here in the US. And that's the way it will continue to be," Fields said in September. "It's really unfortunate when politics get in the way of the facts."

In October Bill Ford called Trump's criticism of the automaker founded by his great-grandfather "infuriating."

Related: Ford will be the first automaker to import cars to India to the U.S.

Ford has announced plans to move small car production to a new plant under construction in Mexico. But the workers who now build those models -- the C-Max and Ford Focus -- will keep their jobs and be put to work building more profitable and popular vehicles, likely the new Ford Bronco SUV.

This is not the first time that Trump has claimed credit for getting Ford to change its mind on Mexico production when in fact Ford was only following the terms of a contract it had reached with the UAW.

A year ago when Ford started building the heavy duty F-Series trucks in Ohio rather than in Mexico, where they had been built, Trump again claimed credit.

"I brought [Ford's Mexican investment plans] up in so many speeches, and frankly I think I embarrassed 'em," he told a crowd in New Hampshire in October 2015. "But Ford is now gonna build a massive plant in the United States, and every single person, even my harshest critics gave me credit for it."

However Ford wasn't building a new plant, simply shifting production to an existing U.S. plant. And that shift had been agreed to four years earlier in a 2011 labor deal with the UAW.