President Donald Trump's aggressive and wildly unpredictable use of tariffs is spooking American business groups, which have long formed a potent force in his Republican Party.

Corporate America was blindsided last week when Trump threatened to impose crippling taxes on Mexican imports in a push to stop the flow of Central American migrants into the United States.

The two sides reached a truce Friday after Mexico agreed to do more to stop the migrants. But by Monday, Trump was again threatening the tariffs if Mexico didn't abide by an unspecified commitment, to “be revealed in the not too distant future.”

Such whipsawing is now a hallmark of Trump's trade policy. The president repeatedly threatens tariffs, sometimes imposes them, sometimes suspends them, sometimes threatens them again. Or drops them.

Business groups, already uncomfortable with Trump's attempts to stem immigration, are struggling to figure out where to stand in the fast-shifting political climate. They have happily supported Trump's corporate tax cuts and moves to loosen environmental and other regulations. But the capriciousness of Trump's use of tariffs has proved alarming.

“Business is losing,” said Rick Tyler, a Republican strategist and frequent Trump critic. “He calls himself 'Mr. Tariff man.' He's proud of it. … It's bad news for the party. It's bad news for the free market.”

“It was a good wake-up call for business,” James Jones, chairman of Monarch Global Strategies and a former U.S. ambassador to Mexico, said of Trump's abrupt move to threaten to tax Mexican goods.

Just last week, the sprawling network led by the billionaire industrialist Charles Koch announced the creation of several political action committees focused on policy, including one devoted to free trade, to back Republicans or Democrats who break with Trump's trade policies. A powerful force in Republican politics, the network is already a year into a “multi-year multi-million dollar” campaign to promote the dangers of tariff and protectionist trade policies.

The Chamber of Commerce, too, is in the early phases of disentangling itself from the Republican Party after decades of loyalty. The Chamber, which spent at least $29 million largely to help Republicans in the 2016 election, announced earlier this year that it would devote more time and attention to Democrats on Capitol Hill while raising the possibility of supporting Democrats in 2020.

Few expect the Chamber or business-backed groups such as the Koch network to suddenly embrace Democrats in a significant way. But even a subtle shift to withhold support from vulnerable Republican candidates could make a difference in 2020.

Trump's boundless enthusiasm for tariffs has upended decades of Republican trade policy that favored free trade. It has left the party's traditional allies in the business world struggling to maintain political relevance in the Trump era.

Trump's tariffs are taxes paid by American importers and are typically passed along to their customers. They can provoke retaliatory tariffs on U.S. exports. And they can paralyze businesses, uncertain about where they should buy supplies or situate factories.

“Knowing the rules helps us plan for the future,” said Jeff Schwager, president of Sartori, a cheese company that has had to contend with retaliatory tariffs in Mexico in an earlier dispute.

Trump seems unfazed.

Myron Brilliant, head of international affairs at the U.S. Chamber of Commerce, went on CNBC on Monday to decry “the weaponization of tariffs” as a threat to the U.S. economy and to relations with trading partners.

Trump responded by phoning in to the network to declare “I guess he's not so brilliant” and defend his trade policies.

“Tariffs,” he said, “are a beautiful thing.”

Trump can afford to be confident about his grip over the party: Roughly nine in 10 rank-and-file Republicans support his performance as president, according to the latest Gallup polling. So Republicans in Congress have been reluctant to tangle with him.

But last week's flare-up over the Mexico tariffs may prove to be a pivotal juncture. The spat was especially alarming to businesses because it came seemingly out of nowhere. Less than two weeks earlier, Trump had lifted tariffs on Mexican and Canadian steel and aluminum, an action that seemed to signal warmer commercial ties between the United States and its neighbors.

“This really came out of left field,” said Daniel Ujczo, a trade lawyer at Dickinson Wright. “It was something we thought we had settled, and we hadn't.”

Congress was already showing signs of wariness, especially over Trump's decision to dust off a little-used provision of trade law to slap tariffs on trading partners. Section 232 of the Trade Expansion of 1962 lets the president impose sanctions on imports that he deems a threat to national security.

Trump has deployed that provision to tax imported steel and aluminum. And he's threatening to impose Section 232 tariffs on auto imports, a chilling threat to American allies Japan and the European Union.

Congress is considering bipartisan legislation to weaken the president's authority to declare national-security tariffs. In doing so, lawmakers would be reasserting Congress' authority over trade policy, established by the Constitution but ceded over the years to the White House.

The legislation has stalled in Congress this spring. But on Tuesday, Iowa Republican Chuck Grassley, chairman of the Senate Finance Committee, said the bill would be ready “pretty soon.” Given “how the president feels about tariffs,” Grassley said, “he may not look favorably on this. So I want a very strong vote in my committee and then, in turn, a very strong vote on the floor of the Senate.”

Congressional reluctance to challenge Trump could be tested in coming months. Lawmakers may balk if he proceeds with plans to tax $300 billion worth of Chinese goods that he hasn't already targeted with tariffs, a move that would jack up what consumers pay for everything from bicycles to burglar alarms.

Likewise, taxing auto imports, an idea that has virtually no support outside the White House, would likely meet furious resistance. So would any move to abandon a trade pact with Mexico and Canada. Trump has threatened to withdraw from the 25-year-old North American Free Trade Agreement if Congress won't ratify a revamped version he negotiated last year.

For all their disenchantment with Trump, the Chamber of Commerce may yet find it hard to break its ties to the party. Though the chamber says it's weighing a more bipartisan approach, it recently featured a sign on its front steps: It likened Trump to Republican icons Ronald Reagan and Dwight Eisenhower.

Paul Wiseman and Steve Peoples report for the Associated Press. Associated Press business writer Joyce M. Rosenberg in New York also contributed to this report.