A tumultuous week that brought the United States to the brink of war with Iran has highlighted an incoherence at the heart of President Trump’s foreign policy, not just in the Middle East but around the globe.

Publicly, Trump is determined to appear tough. The problem is that the president’s policy goals, the outcomes he is trying to achieve, have never been murkier. The confusion extends not only to America’s adversaries — Iran, North Korea and Venezuela — but also its allies in Europe and Asia. Even senior Trump administration officials who populate the Situation Room and are charged with successfully executing the president’s policies seem confused about what will satisfy their commander in chief.

The net result is a president who has proved adept at triggering foreign policy crises, which have piled up during his more than two years in office, but who seems unable to defuse them.

Nowhere is that confusion more apparent or more dangerous than on Iran policy.

Secretary of State Mike Pompeo last year laid out a dozen “basic requirements” that Iran would have to meet before the United States would consider relaxing some of the strongest economic sanctions in history. These included Iran ending its support for militia proxies and terrorist groups, making peace with its neighbors, and submitting to an inspections regime that would ensure that it never developed a nuclear weapon.

John Bolton, Trump’s national security adviser, has been a staunch advocate for regime change.

Trump, meanwhile, has suggested that his goals are limited to renegotiating the nuclear agreement that his predecessor, Barack Obama, reached with Tehran in 2015. “As long as Trump can say ‘I did better than Obama,’ I think he’ll be okay with it,” said Dennis Ross, a Middle East expert who advised both Obama and President George H.W. Bush.

Supporters of Trump describe his tolerance for extreme levels of ambiguity as an essential part of his negotiating genius — the application of “The Art of the Deal” to matters of war and peace.

Others expressed more skepticism.

“Trump negotiates by coming out with maximalist demands and acting like the craziest guy in the room, and then getting a deal that he deems acceptable and spinning it as the greatest deal ever,” said Mark Dubowitz, chief executive of the Foundation for Defense of Democracies, a nonpartisan foreign policy think tank.

The question is whether such an unpredictable approach will lead an economically crippled Iran to the negotiating table or result in a cornered regime pushing the United States closer to war.

“There is no advantage to nobody knowing what your goals are and nobody believing you have goals,” said Jake Sullivan, who took part in early, secret negotiations with Iran during the Obama administration. “There has to be a logic your counterparts can understand. If you are giving them nothing, there’s no way to get them to do what you want them to do.”

Meanwhile, Trump’s approach risks the kinds of miscalculations that can lead to war. Those dangers were especially apparent this week when Trump came within hours, or possibly minutes by his own accounting, of launching strikes that could have killed as many as 150 Iranians in retaliation for the shoot-down of an American drone.

The president stopped the strikes because, he said, he decided they would not have been “proportionate.” He then vowed in a tweet that “Iran can NEVER have Nuclear Weapons, not against the USA, and not against the WORLD!”

The chaos left even Trump’s allies and cheerleaders in the media confused. In the hours after Trump called off the strikes, Tucker Carlson, a Fox News host who has advised the president on policy, praised him for resisting advisers who were “demanding a new war” with Iran. The next day, Pete Hegseth, a host on “Fox & Friends,” the president’s favorite morning show, worried that Trump’s hesi­ta­tion would embolden Iran and make the United States “look weak.”

“That’s not okay,” he said.

The president’s approach to Iran this week follows a pattern that could complicate the other foreign policy crises consuming the White House. This spring Bolton suggested that Trump would be willing to use military force to drive Venezuelan President Nicolás Maduro from power in favor of opposition leader Juan Guaidó, whom the president declared the legitimate leader of the country.

In Caracas, there was an expectation among some opposition leaders that the U.S. Army’s “101st Airborne Division would show up in the streets,” said Fernando Cutz, a former National Security Council official under Trump and Obama and a senior associate at the Cohen Group.

Trump, however, seems to have quietly taken the military option off the table. “We got to the point of put up or shut up,” Cutz said. “We were going to back up our threats or stop talking about Venezuela. And when the moment arrived, we decided to stop talking.”

In North Korea, Trump similarly started with tough talk that gave way to internal dissension and then ended in ambiguity over the president’s long-term policy goals.

Jung H. Pak, a former U.S. intelligence officer and a senior fellow at the Brookings Institution, said Trump’s handling of Iran this week will send a message to North Korean leader Kim Jong Un.

“If Kim were looking at this Iran issue, he would say, ‘I’ve been there, Trump is clearly a paper tiger when threatening these types of things,’ ” Pak said. “How do you respond to a paper tiger? You just respond with more aggression, because you start to downplay the threats and the real consequences of your actions.”

The growing realization that no one but Trump has a clear understanding of his policy or desired endstate makes it almost impossible for the rest of the government to function. For allies in Europe or in Seoul, this confusion “will just reinforce the belief that the only person that they should talk to in the [U.S. government] is the president,” said Victor Cha, a former White House official in the George W. Bush administration.

This approach to policy “will make working-level negotiations impossible, which will then make the next summit substance-less,” Cha said. “It’s a vicious circle.”

For now, though, the biggest dangers seem to reside with Iran, where the prospects for talks appear dim and the chances of a mistake that could lead to war seem to be on the rise. Trump has said repeatedly that he would like to negotiate with Iran, but neither Washington nor Tehran has articulated a clear set of demands that might lead back to the negotiating table.

“Both sides see themselves as acting defensively and see the other as aggressors,” said Colin Kahl, a former Obama administration Pentagon official. “This sets up a classic spiral to conflict, even if both sides would prefer to avoid one.”

Paul Sonne contributed to this report.