INDIANAPOLIS — President-elect Donald Trump on Thursday again threatened to punish companies that move their operations overseas even as he defended directly negotiating a $7 million incentive package to keep one factory here open.

Trump struck the deal with air conditioner manufacturer Carrier over the past few days. Under the terms announced Thursday, more than 1,100 jobs would remain at its plant here. Many of them had been slated to move to Mexico. The company would receive $7 million in incentives from Indiana in exchange for a $16 million investment in the facility over the next two years — though Trump said Thursday that amount would probably be higher.

In remarks to employees and local officials after a tour of the factory, Trump opened the door to similar discussions with other companies considering moving out of the country, setting the stage for unprecedented intervention by the White House into private enterprise.

“I think it’s very presidential. And if it’s not presidential, that’s okay ... because I actually like doing it," Trump said. “But we’re going to have a lot of phone calls made to companies when they say they’re leaving this country, because they’re not going to leave this country.”

Trump said he called up Gregory Hayes, chief executive of Carrier's parent company, United Technologies, after watching a nightly news report about Trump's campaign promise to keep the plant open. Trump said at first that he did not recall making the statement, then said he had not intended it to be taken literally. But the broadcast moved him to take action, he said.

“I said, Greg, you gotta help us out here. You gotta do something," Trump recalled Thursday.

In a statement, the company said the deal is contingent on employment, job retention and capital investment. Meanwhile, it still plans to shift production to Mexico from another Indiana facility that employs about 700 people. Carrier has been a staple of the local business community since the 1950s, and the 550,000-square-foot plant here processes 100 million pounds of raw steel each year.

During the election, Trump had warned that companies who outsource manufacturing jobs could face stiff penalties. He repeated that threat on Thursday, calling for a tax on goods produced by American companies outside of the nation's borders and then imported back into the country. Trump also said he remains committed to building a wall along the Mexican border.

“Companies are not going to leave the United States any more without consequences," he said.

But Sen. Bernie Sanders of Vermont, who ran for the Democratic presidential nomination, said the deal negotiated with Carrier and United Technologies was not a punishment but a reward for a company that had intended to outsource its work.

"In essence, United Technologies took Trump hostage and won," Sanders said Thursday in an opinion piece for The Washington Post.

Experts said that no modern president has intervened on behalf of an individual company, a move that amounts to the nation's highest office choosing winners and losers in the economy. Timothy Bartik, an economist at the nonpartisan W.E. Upjohn Institute for Employment Research, pointed out that President Obama stepped in to rescue car manufacturers after the 2008 financial crisis and President John F. Kennedy intervened to prevent steel producers from increasing prices. But these actions affected entire industries, not decisions at a specific plant, he said.

Jeff Windau, an analyst at the investment firm Edward Jones in St. Louis, argued that Trump may not have the “bandwidth” to keep up this kind of deal-making once in the Oval Office. “Having a current president-elect focus on a specific company and a specific location — it’s a pretty micro view of the world,” he said.

Conservatives have long decried such incentive packages as distorting free markets, while liberals have characterized them as corporate subsidies. But House Speaker Paul D. Ryan (R-Wis.) told reporters Thursday that he supported the agreement. He emphasized that Republicans are hoping to pass comprehensive tax reform that would lower corporate tax rates, providing a boon to all businesses beyond any individual deals.

"I think it's pretty darn good that people are keeping their jobs in Indiana instead of going to Mexico," Ryan said.

Just down the road from the factory, the lunchtime crowd was starting to file into Sully’s Bar and Grill. Quan Carswell has worked at Carrier for 15 years and said he hopes that his wages and benefits stay the same.

“I’ve been here a long time,” he said. “I’m kind of committed, you know?”

His co-worker Taylor Howard said she had started looking for jobs in the medical industry before learning the factory would stay open. She was still wary of the terms Trump may have negotiated but hoped for the best.

“It might be a little bit of a publicity stunt, to tell you the truth,” Howard said. “But if it ends up on the up and up, that’s noble of him.”

One of the restaurant’s bartenders, Jennifer Volheim, said she was “heartbroken” when the factory was on track to shut down. “We were gonna lose a lot of business,” she said. “They worked their whole lives there. They knew nothing but working there.”

The bar has been operating for roughly 25 years, serving up its traditional crispy chicken wings and beer during the factory’s lunch and dinner breaks. Even on weekdays, it stays open until 3 a.m. to accommodate late-night shifts.

“Everybody that was in here, you consider them a friend,” Volheim said. When she voted for Trump, she said, she knew he would make a difference. “We knew Trump was on it,” she said. “He’s not even in office yet, and he’s saving … jobs.”

Trump's anti-free-trade message helped galvanize his populist supporters during the election campaign, and he has repeatedly pointed to the factory’s planned move to Mexico as a prime example of the perils of globalization: Workers at this unionized plant reportedly earn as much as $25an hour, while Carrier was expected to pay to employees roughly $5 an hour at the new 645,000-square-foot factory currently under construction outside of Monterrey.

It remains unclear how aggressive a stance Trump plans to take as president. Though he renewed his call for a border tax Thursday, just a day earlier, two of his top economic advisers appeared to step away from Trump's vows to slap double-digit tariffs on Mexican and Chinese imports, calling those moves a last resort.

On Thursday, Trump dismissed the North American Free Trade Agreement as “a total and complete disaster" and "a one-lane highway into Mexico.” His economic team used more careful language in news interviews Wednesday. They said the administration would move away from sweeping multinational trade deals such as the Trans-Pacific Partnership with Asia in favor of one-on-one agreements with individual countries.

“The problem with regional trade agreements is you get picked apart by the first country. Then you negotiate with the second and you get picked apart. And you go with the third one, you get picked apart again,” said Wilbur Ross, Trump’s nominee for commerce secretary in an interview on CNBC. Ross invested heavily in the steel industry in the early 2000s. “We need to treat other countries as good suppliers, not as determining the whole show," he said.

Trump celebrated the deal in a string of tweets this week. In one, Trump painted an optimistic — but inaccurate — future for the factory. “They will sell many air conditioners!” he wrote. The plant manufactures gas furnaces.

Carrier had rejected an incentive package from the state earlier this year. But that was before Trump won the election and Indiana Gov. Mike Pence became the vice president-elect. United Technologies does significant business with the federal government, with contracts accounting for roughly 10 percent of its annual sales.

“The dynamics changed,” said John Mutz, a board member of the Indiana Economic Development Corporation and a former state lieutenant governor.

Defense analysts said that Trump could not legally steer any contracts to United Technologies or punish them through the Pentagon’s highly regulated acquisition system. The Federal Acquisition Regulation is thousands of pages long and is run through an often stifling bureaucracy that determines requirements, puts out requests for proposals from industry, then embarks on a lengthy selection process that can take months, if not years.

“The Pentagon is United Technologies's biggest customer, but military purchases are tightly controlled by laws and regulations,” said Loren Thompson, a defense consultant at the Lexington Institute, who counts many of the largest contractors as his clients. “If there is a quid pro quo for keeping jobs in Indiana, it would probably involve a commitment to improve the tax and regulatory environment in which manufacturers operate. Over time, President Trump may secure greater discretion in rewarding companies that do what he wants, but right now the president has relatively little latitude without being accused of favoritism.”

Mackenzie Eaglen, a defense analyst at the American Enterprise Institute, said that the acquisition system can’t be used as a bargaining chip: “The short answer is no, and it would be highly illegal. Period.”