WASHINGTON ― A company that Donald Trump frequently bashed for planning to outsource 1,400 jobs to Mexico said Tuesday that it had decided to keep most of those jobs in the United States.

“We are pleased to have reached a deal with President-elect Trump” and Vice President-elect Mike Pence to keep nearly 1,000 jobs in Indiana, the Carrier Corporation said on Twitter.

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

During the campaign, Trump frequently criticized Carrier, a company that makes air conditioners and furnaces, for its plans to shutter a factory in Indianapolis in favor of one in Monterrey, Mexico. Trump held up the company as an example of all that was wrong with U.S. trade agreements that make it easy for companies to save money by using cheaper foreign labor while laying off American workers.

Trump said on Twitter last week that he was negotiating with the company to change its plans.

T.J. Bray, a Carrier worker who’s been with the company since graduating high school 14 years ago, said he was returning from his daughters’ gymnastics class when his phone started ringing. Bray has been one of Carrier’s most vocal workers, many of whom protested the company’s Mexico plans.

“We’re happy, if this is the true, real deal,” Bray told The Huffington Post on Tuesday evening. “I’m hoping that my job stays.”

Bray said he hadn’t heard anything directly from the company.

“We saw what Carrier put on Twitter that they have a deal,” he said.

Carrier’s parent company, United Technologies, had planned to lay off a total of 2,100 workers over the next three years, including 1,400 at Carrier. A company spokesperson declined to provide additional details beyond what Carrier had said in its tweet.

Sen. Joe Donnelly (D-Ind.), who has criticized Carrier this year and proposed penalties for companies that offshore jobs, welcomed the news in a statement and said he was eager for specific details about the deal.

“For many months I have been fighting alongside the Carrier workers and pushing to keep these jobs in Indiana,” Donnelly said. “While this is good news, in Indiana alone, there are at least two other companies currently planning to move Hoosier jobs out of the country.”

One of the companies, Rexnord, has been planning to lay off nearly 300 workers from an Indianapolis plant that makes bearings.

United Steelworkers president Leo Gerard credited the union’s workers for bringing attention to Carrier with a viral video about the layoffs earlier this year.

“The dedicated USW members in Indianapolis who build quality heating equipment for Carrier deserve credit for bringing the union’s fight to save their jobs to the attention of the nation during the 2016 presidential campaign,” Gerard said. “We thank President-elect Trump for listening to our members and following through on his campaign pledge to persuade Carrier to keep production of quality heating equipment in Indianapolis.”

The New York Times reported that Trump and Pence, Indiana’s governor, would appear in Indiana on Thursday.

Trump had vowed during the campaign to stop companies from shifting jobs to Mexico by hiking tariffs on their imports, though that’s apparently not what he’s done with Carrier. The Times reported that Trump and Pence pledged to ease taxes and regulations and tone down Trump’s tariff rhetoric.

Trump may have had some leverage over United Technologies because the company gets a chunk of its revenue from government contracts.

A CNBC correspondent reported that part of the deal includes new “inducements” from Pence’s government.

Deal terms to keep Carrier jobs in Indiana include new inducements from state. Deal spear headed by former Indiana Gov Pence. — David Faber (@davidfaber) November 30, 2016

This story has been updated to include comment from Donnelly and United Steelworkers.