The incoming Trump administration and United Technologies have reached an agreement that will keep close to 1,000 jobs at Carrier Corp., which is owned by United Technologies, in Indiana.

Carrier had planned to move production from a key factory in that state to Mexico, taking with it the roughly 1,400 jobs of those who work at the Indiana plant.

But shortly after CNBC revealed that Donald Trump was expected to travel to Indiana on Thursday to reveal that a deal had been reached, Carrier itself confirmed the agreement.

We are pleased to have reached a deal with President-elect Trump & VP-elect Pence to keep close to 1,000 jobs in Indy. More details soon. — Carrier (@Carrier) November 30, 2016

Under a deal negotiated by Vice President-elect Mike Pence and United Technologies CEO Greg Hayes, the company will now keep most of those jobs in Indiana, sources close to the matter told CNBC.

While terms of the deal are not yet clear, the sources indicated there were new incentives on offer from the state of Indiana, where Pence is governor, that helped clear a path for the agreement.

I will be going to Indiana on Thursday to make a major announcement concerning Carrier A.C. staying in Indianapolis. Great deal for workers! — Donald J. Trump (@realDonaldTrump) November 30, 2016

While United Technologies was seeking the savings that would come from moving some production to Mexico, people familiar with the situation indicated that the savings were not worth incurring the wrath of the incoming administration and the potential threat to the significant business that United Technologies currently conducts with the U.S. government, largely in the form of orders for jet engines and other defense-related equipment.

Trump had made the expected departure of the Carrier jobs a key theme in his campaign to capture the White House, using it as an example of the type of trade relationship that hurt U.S. workers.

On Thanksgiving Day, Trump tweeted that he was making progress on negotiating a deal with United Technologies.

CNBC broke the story of the agreement first on Twitter.