The United States and the European Union stepped back from the brink of an escalating trade war Wednesday, with the unexpected announcement of a process to ease tensions and avoid further tariffs.

In an appearance in the White House Rose Garden, President Trump and European Commission President Jean-Claude Juncker said they had agreed to hold off on proposed car tariffs, and work to resolve their dispute on steel and aluminum tariffs, while pursuing a bilateral trade deal.

“While we are working on this, we will not go against the spirit of this agreement unless either party terminates the negotiation,” Trump said. “We also will resolve the steel and aluminum tariff issues, and we will resolve retaliatory tariffs.”

While Washington and Brussels pursue those aims, the E.U. will import more U.S. soybeans and liquefied natural gas, or LNG, although Juncker suggested that that agreement came with conditions.

“We are ready to invest in infrastructure, new terminals, which could welcome imports of LNG from the United States and elsewhere, but mainly from the United States, if the conditions were right and price is competitive,” he said in a speech at the Center for Strategic and International Studies later Wednesday.

The conciliatory statements from Trump and Juncker could temporarily ease fears of a further escalation of a transatlantic trade war, but questions remain.

Trump did not definitively agree to suspend steel and aluminum tariffs against E.U. countries. Similarly, Juncker did not agree to reduce tariffs on U.S. car imports. And although Trump signaled that he would not impose new tariffs on European goods, such as cars, he did not take that option entirely off the table, preserving leverage in case the talks falter.

Even so, markets jumped in the closing minutes of the day when word of a potential deal began to circulate.

White House officials viewed the meeting as a major breakthrough and an acknowledgment that Trump’s hardball tactics were paying dividends.

The agreement drew cautious praise from a range of Republicans and some Democrats.

AshLee Strong, a spokeswoman for House Speaker Paul D. Ryan (R-Wis.), said Ryan “is encouraged by this progress with our European allies and hopes to see more.”

But there were limits to what the talks achieved. There was not a specific agreement on existing tariffs on automobiles, which had been Trump’s primary source of frustration with European leaders since at least last year.

And although Juncker is an important figure in European politics, any final deal must be seen as acceptable to a range of leaders of E.U. nations, any one of whom could issue a statement that offends Trump and upends the entire process.

Chad Bown, an economist who worked in the White House during the Obama administration, said the language from both sides at the Rose Garden ceremony signaled a willingness to work together and remove trade barriers, a sharp departure from the rhetoric Trump has used in recent weeks threatening punitive measures against U.S. allies, including members of the E.U.

The announcement Wednesday fell short of what Trump had promised.

“Words only mean so much,” Bown said. “We could see a tweet in 20 minutes to completely reverse all of this, but this — in and of itself, in isolation — was a positive sign.”

The White House has touted half-step trade agreements before, only to see them crumble and lead to increased acrimony. In May, Treasury Secretary Steven Mnuchin returned from a trip to Beijing and said that the trade war with China had been put on hold and that both sides had agreed to halt new tariffs. The detente lasted only days before talks broke down, leading to an escalation of protectionist trade measures by the world’s two largest economies.

Until Wednesday afternoon, several of Trump’s senior economic advisers had believed the president was on the verge of escalating the trade war by declaring 25 percent tariffs on nearly $200 billion in foreign-made automobiles, three people briefed on internal discussions said.

In recent months, Trump has become increasingly defiant in his trade strategy, following his instincts and intuition and eschewing advice from his inner circle. He has told advisers and Republicans to simply trust his business acumen, a point he sought to reinforce Wednesday morning in a tweet.

“Every time I see a weak politician asking to stop Trade talks or the use of Tariffs to counter unfair Tariffs, I wonder, what can they be thinking?” Trump said. “Are we just going to continue and let our farmers and country get ripped off?”

So far, there is little evidence that this trade approach is working.

Trump has said that imposing tariffs on foreign cars could push Americans to buy more U.S. automobiles, helping U.S. workers. But critics think tariffs would drive up the costs of all cars and pass those inflated prices on to consumers.

The United States imported a record $192 billion in new passenger vehicles in 2017. The E.U. charges a 10 percent tariff on imports of U.S. automobiles, and the United States has a 2.5 percent tariff on European cars. The United States also charges a 25 percent tariff on light trucks from other countries. Complicating matters further, a number of top European automobile companies, such as BMW and Mercedes, make many automobiles in the United States, as do Japanese companies such as Honda, Nissan, Toyota and Subaru.

Commerce Department officials are considering a variety of options to address Trump’s insistence that cheap foreign cars are flooding the U.S. market, and some of those measures would stop far short of imposing tariffs, two people briefed on the discussions said. But several of Trump’s advisers think he is expected to follow the approach he took with steel and aluminum imports and choose the most severe restrictions and his favored tool — tariffs across the board, according to the three people briefed on White House discussions.

The constant back-and-forth of meetings, threats, tariffs and countertariffs has spooked many Republicans, splintering the GOP and many of the business groups that marched in lockstep with Trump last year in his push to lower taxes.

Several months after Trump first imposed tariffs on steel and aluminum imports, the United States is in economic skirmishes with China, Japan, the E.U., Canada, Mexico and Turkey. Trump has also complained about what he views as unfair trade practices from India, suggesting he could soon turn his attention to the world’s second-most-populous country.

The disharmony within the White House is spilling into public view, something that appears to be bothering Trump. On Wednesday, White House budget director Mick Mulvaney said at a CNBC event that he and National Economic Council Director Larry Kudlow were at odds with others on how to proceed on trade but that Trump made the ultimate decisions on his own.

“The president hears all the arguments, but he makes the final decision,” Mulvaney said.

A tweet suggests Trump is irked by people questioning his approach.

“When you have people snipping at your heels during a negotiation, it will only take longer to make a deal, and the deal will never be as good as it could have been with unity,” he wrote Wednesday. “Negotiations are going really well, be cool. The end result will be worth it!”

Before Trump could impose tariffs on auto imports, the Commerce Department would have to issue a finding that they pose a national security threat. Several Republican lawmakers have said such a finding would be laughable, but the Commerce Department has flexibility to make a determination on its own.

A Commerce Department official, speaking on the condition of anonymity to discuss the process, said that the review has not been completed and that no final decisions have been made.

Commerce Secretary Wilbur Ross said Wednesday evening that his investigation of auto imports remained ongoing despite the White House agreement, a sign that tensions between Trump and European leaders could reignite on a moment’s notice.

The prospect of such uncertainty is likely to keep many Republicans on edge, as they had begun to sense a final decision could be made in the next month.

“There are some in the economic community who view this as the bright line,” said Douglas Holtz-Eakin, a Republican and former director of the Congressional Budget Office. If Trump does this, Holtz-Eakin said many Republicans have told him, they will no longer “support the president any more. They are done.”

There are growing signs, though, that Trump is cognizant of the GOP trade criticism and taking steps to try to quell a mutiny. His administration on Tuesday announced up to $12 billion in emergency aid to farmers who are facing retaliatory tariffs from Mexico and China, among other countries.

Farmers have called on Trump to back down from his tariffs strategy, but Trump made clear Tuesday and Wednesday that he had no plans to, believing it gives him the upper hand in negotiations.

Trump’s approach stands in sharp contrast to what happened in the White House last year, when senior advisers were able to prevent Trump from following his protectionist instincts on trade decisions. The president had wanted to withdraw from the North American Free Trade Agreement and a trade deal with South Korea, but he was talked out of it.

Former senior economic adviser Gary Cohn was a lead voice among those cautioning Trump against protectionism, warning that a schism over trade would threaten the fragile unity the GOP needed to pass the tax bill.

But Cohn is gone, having departed the White House shortly after Trump announced plans for tariffs on imported steel and aluminum. Trump has cast off the more measured approach favored by advisers such as Kudlow, Cohn’s successor, and Mnuchin, instead saying that an all-or-nothing stance garners the most respect from foreign leaders.

And the remaining pro-free-trade faction of the White House is less organized than a year ago. Last year, there was a process for weekly meetings on trade policy among top advisers. But that process has mostly broken down since Cohn’s departure, and there is not a broad consensus among White House officials on how to proceed.

This has given Trump more room to follow his instincts, with his approach often backed by Peter Navarro, one of his top trade advisers who often clashed with Cohn last year. Navarro is and trade hawk who thinks China and other countries have destroyed millions of American manufacturing jobs over decades through their trade policies.

The Commerce Department held an open meeting last week and heard from 45 groups on the automotive review, with all but one cautioning against the tariffs. The group that offered measured support was the United Automobile Workers.

Some outside advisers have privately urged Commerce Department officials to tailor any restrictions so that they affect only advanced technology used in cars and not the cars themselves, creating an opening for U.S. companies without inadvertently driving up broad costs for consumers.

But Trump was presented with a similar array of proposals on the steel and aluminum tariffs, and he selected the most severe one, saying it was needed to correct what he viewed as unfair practices by foreign countries.

“The one thing I do know about Trump is that he’s not going to back down,” said Stephen Moore, who was a top economic adviser to Trump during the 2016 campaign. “He’s not going to be bullied. That means the ball is in these other countries’ court.”

Correction: An earlier version of this story incorrectly said that the United States charges a 25 percent tariff on sport-utility vehicles. The import tariff on such cars is commonly 2.5 percent.

Erica Werner in Washington and Quentin Ariès in Brussels contributed to this report.