NEW YORK — As president, Donald Trump won’t be able to punish General Motors Co. for building cars in Mexico without violating NAFTA. That may not stop him from taking an unprecedented step against an American company.

Trade experts agree that presidents have wide latitude to impose penalties on imports, at least temporarily, even if courts later find them unlawful.

Targeting a single company with a tariff as Trump threatened to do with GM in a tweet Tuesday is unheard of and barred under the North American Free Trade Agreement, according to trade experts. Punishing GM with a tariff on its Mexico-made cars — or any other U.S. company that has shifted production there — could prompt a Mexican response that would hurt U.S. exports and raise the price of all goods from the country.

“The notion of using emergency tariff-raising authority to influence the investment location decisions of a single company would be an unprecedented use of that authority and far beyond what Congress ever intended,” said Edward Alden, a trade expert at the Council on Foreign Relations. “Turning those powers on a single U.S. company because you don’t like its strategy just takes us to a whole new realm.”

The Republican rattled automakers on Tuesday when he tweeted that he would make General Motors pay a “big border tax” on Chevy Cruze models manufactured in Mexico and shipped across the border to U.S. dealers. On the same day, GM’s competitor, Ford Motor Co., canceled plans to expand in Mexico and said it would add jobs in Michigan instead.

A GM spokesman said the company has imported to the U.S. only 4,500 of the Cruze hatchbacks it’s manufactured in Mexico. Americans have bought about 190,000 Cruze sedans that were all built in Lordstown, Ohio, a second company spokesman said.

The mere threat of a tariff or other punishment may be enough for Trump to get what he wants. The president-elect has repeatedly used the bully pulpit to pressure companies to change their business plans since winning election Nov. 8, as when United Technologies Corp. unit Carrier announced in November it would keep open a furnace plant in Indianapolis instead of moving about 850 jobs to Mexico.

Doug Holtz-Eakin, a former director of the Congressional Budget Office who is president of the right-leaning research group American Action Forum in Washington, said that Trump’s GM tweet might be better understood as the “opening bid in the negotiations.”

“A lot of this is about setting the agenda and getting people to talk about what he wants to talk about,” Holtz-Eakin said. “It’s not something that in the end generates great policy.”

GM might be able to challenge any Trump tariff in court and win; the 1974 law that Trump would likely cite as the source of his trade authority allows presidents to target countries, not companies, said Gary Hufbauer, a researcher at the Peterson Institute for International Economics and a former U.S. government tax and trade official.

Trump has vowed to renegotiate the two-decade-old NAFTA, which bars the U.S. from assessing tariffs on goods made in Canada or Mexico. As president, Trump would have the power to withdraw from NAFTA entirely, though no president has abandoned a trade treaty since the 1800s. But even pulling out of the three-nation pact wouldn’t necessarily enable Trump to ratchet up tariffs to 35 percent, the level he pledged during his campaign.

Duties on goods produced in Mexico would only rise to the rate for countries with “most favored nation” status in the U.S.: about 4 percent, said Doug Irwin, an economist and trade expert at Dartmouth College.

Trump could impose 15 percent duties for 100 days on GM’s cars, claiming a “balance payments emergency,” but that would fall short of the punishment he’s threatened. Other fines, such as anti-dumping duties, require special and lengthy procedures to enact. For his 35 percent tariff to stick, Trump would likely have to ask Congress to include it in a broader overhaul of the U.S. tax code.

Republican Sen. Rob Portman of Ohio publicly expressed unease with Trump’s proposed GM tariff.

“If we do that it will end up hurting our consumers here because everything at Wal-Mart’s going to go up dramatically because they’ll retaliate against us,” said Portman, a former U.S. trade representative and a member of the Senate Finance Committee.

Trump and House Republicans are aligned on much of their tax policy, but they differ starkly on how imports should be treated. Both want to lower the current top corporate income tax rate — Trump to 15 percent and House Republicans to 20 percent. But the Republicans also propose a system known as “border adjustments” that would levy the 20 percent rate only on U.S. companies’ domestic sales. Their exports would be untaxed, and their imported goods would be taxed at 20 percent, much lower than Trump’s 35 percent tariff.

The Republicans’ border-adjustments plan also “would probably violate NAFTA rules,” said Steve Charnovitz, a professor of public international law at The George Washington University Law School.

Trump’s tariffs would likely result in additional negative economic effects. If taxes on exports were not simultaneously eased, all U.S. companies that buy or sell things abroad would be harmed, said Alan Cole, an economist at the Tax Foundation in Washington.

“There are right ways and wrong ways of doing this,” Cole said in an interview. “A tariff is discriminatory.”

And focusing on specific companies could cause damage by creating uncertainty about the rules and how they apply, he said — though Washington’s influence industry may view that as upside.

“It just creates incentives for out-sized lobbying budgets,” he said.