WASHINGTON (Reuters) - United Technologies Corp UTX.N has reached a deal with President-elect Donald Trump and Vice President-elect Mike Pence to keep close to 1,000 jobs at its Carrier Corp air conditioner plant in Indianapolis, roughly halving the number of U.S. jobs it planned to move to Mexico.

The deal, announced by Carrier on Twitter late on Tuesday, is a victory for Trump, who campaigned hard on keeping jobs in the United States and specifically criticized Carrier for shipping jobs overseas, messages which appealed to blue-collar workers in the Midwest.

“I will be going to Indiana on Thursday to make a major announcement concerning Carrier A.C. staying in Indianapolis,” Trump tweeted late on Tuesday. “Great deal for workers!”

Company officials, Trump and Pence, who is the governor of Indiana, will announce some of the deal’s terms on Thursday, a source familiar with the matter told Reuters.

Indiana state officials were involved in the talks, but it was unclear what, if any, inducements the state may have made to encourage Carrier to keep the jobs in the United States.

Carrier’s parent, United Technologies, has a strong incentive to keep good relations with Trump and his incoming administration, given that a portion of its estimated $57 billion revenue this year will come through U.S. military contracts at its Pratt & Whitney and UTC Aerospace Systems units.

Carrier announced plans in February to close an air conditioner factory in Indianapolis with the loss of 1,400 jobs. It said a further 700 jobs would be cut from another plant in Huntington, Indiana, northeast of Indianapolis.

The company planned to move the jobs to Monterrey, Mexico, starting in 2017. Local union leaders said Carrier told them it would pay Mexican workers $3 an hour compared with more than $20 for their U.S. counterparts.

The announcement prompted attacks from Trump during his campaign, and he vowed to impose hefty taxes on imported Carrier products if it did not reverse the move.

He predicted in February the company would call him to say “Mr. President, Carrier has decided to stay in Indiana,” and promised the chances of the plant staying open was “100 percent.”

As recently as 10 days ago, Carrier insisted it had no plans to reverse course, but then acknowledged on the Thanksgiving Day holiday on Nov. 24 that it was in talks with the Trump transition team.

Trump has promised to keep U.S. jobs from moving overseas by renegotiating or withdrawing from trade agreements and imposing tariffs on foreign-made goods.

But it is not clear he can reverse broader trends that have led to the loss of more than 5 million U.S. manufacturing jobs since 2000.

Democratic Indiana Senator Joe Donnelly praised the announcement by Carrier to keep jobs in the state, but said “there are at least two other companies currently planning to move Hoosier (Indiana) jobs out of the country. We need to change our laws to encourage companies to grow here at home.”

Carrier is just one of many U.S. manufacturers moving jobs to Mexico. However, videos of a company official delivering the news to the Indianapolis plant’s stunned workforce, posted on YouTube, provided a vivid look at the pain and anger such decisions cause.

Earlier this month, Ford Motor Co F.N made a decision to keep production of a Lincoln sport utility vehicle in Kentucky, which Trump claimed as a victory for keeping the plant in the United States, even though Ford never had plans to move the entire factory to Mexico.