WASHINGTON — President Donald Trump campaigned on promises to extract the United States from wars in the Middle East. But his national security adviser, Republicans in Congress and trusted allies in Israel and Saudi Arabia are pushing for a confrontation with Iran.

The rationale for taking an aggressive stance with Tehran may differ, but leaders in Tel Aviv, Riyadh and hawks in Washington share a common view that diplomacy with Iran is mostly futile and that the regime will only respond to massive economic pressure and, if necessary, military force.

"The behavior and objectives of the regime are not going to change," John Bolton, now Trump's national security adviser, said at a convention organized by an Iranian opposition group in 2017. "Therefore the only solution is to change the regime itself."

It's unclear whether Trump will heed Bolton's advice, as well as the counsel of leaders in Israel and Saudi Arabia, and push Iran to the brink, or pull back and pursue the "art of the deal." Trump engaged in a provocative war of words with North Korea in his first months in office before opting to meet North Korean leader Kim Jong Un twice in a bid to persuade Pyongyang to give up its nuclear weapons.

No deal with North Korea has emerged so far — and no deal is on the horizon — but tensions are drastically reduced compared to 2017.

During Trump's first year in office, his cabinet included more cautious voices on Iran, with then Secretary of Defense James Mattis, former Secretary of State Rex Tillerson and ex-National Security Adviser H.R. McMaster appealing to Trump to postpone withdrawing from the multinational 2015 nuclear deal known as the JCPOA.

Trump eventually pulled the plug last year and took the U.S. out of the agreement. Now with Mattis and Tillerson gone, the balance in Trump's White House has shifted. Influential figures, including Bolton, favor a more aggressive line on Iran, and their views are echoed by leaders in Israel and Gulf Arab states.

For Israeli Prime Minister Benjamin Netanyahu, Iran poses an existential threat to his nation due to its ideology, its backing of proxies in Lebanon, Syria and elsewhere, and above all — its nuclear ambitions. He has long warned of the dangers of negotiating with Iran, and clashed repeatedly with Trump's predecessor in the White House over how to handle Tehran.

Download the NBC News app for breaking news and politics

Netanyahu has forged a close relationship with Trump, which proved politically valuable during his recent re-election victory. And the rapport between the two men could aid Trump's bid for re-election in 2020.

While Netanyahu benefits politically from his tough stance on Iran, his outlook reflects a grave concern about what a nuclear-armed Tehran could mean for Israel, said Ilan Goldenberg, senior fellow at the Center for a New American Security, who worked on Israeli-Palestinian issues while in the Obama administration's State Department.

"For him, it's less about politics, but a belief that Iran is a genuine threat," Goldenberg said. "Netanyahu's view is that there's no way to find common ground with Iran" and the only solution is "either through regime change or total surrender."

Under Netanyahu's leadership Israel has found common ground with Gulf Arab states over Iran, even as the Israeli-Palestinian peace process has collapsed.

In February, Netanyahu said in a Hebrew video posted on social media and in an English-language tweet that Israel and Arab countries were discussing how "to advance the common interest of war with Iran." His office later deleted the tweet and replaced it with another calling for "combating Iran."

For Saudi Arabia, Iran's nuclear program is less of a priority, experts and former officials said. Instead, the Saudis see Iran as a threat to the kingdom's power and status in the region.

Since Iraqi dictator Saddam Hussein was ousted in the 2003 U.S-led invasion of Iraq, Saudi Arabia and Iran have been locked in a regional power struggle, with each side backing proxies and partners. Riyadh fears Shiite-ruled Iran is plotting to foment unrest in its own kingdom among the Shiite community, and that Tehran's support for Houthi rebels in Yemen is part of that strategy.

Saudi-Iran relations have ebbed and flowed over the years, with periods of relative calm and dialogue. But tensions have spiked since the execution of a Shiite cleric by Saudi authorities in 2016 and the rise of Crown Prince Mohammad bin Salman, who pushed for waging war on Houthi rebels in Yemen. The Saudi-led military campaign has turned into a stalemate on the battlefield and a public relations disaster for the kingdom, with aid organizations accusing Riyadh of helping to fuel the world's worst humanitarian crisis.

The Saudis bitterly opposed Obama's diplomatic overtures to Tehran, and Trump's policies have come as a relief. The kingdom has worked closely with the White House to ensure sanctions on Iran do not jolt the global supply and send oil and gas prices soaring.

The U.S. economic sanctions are hitting Iran hard, triggering rampant inflation and threatening to drain away its hard currency reserves. "They're scrambling and struggling to find a way out of the strategic impasse," said Suzanne Maloney of the Brookings Institution think tank.

But it's too early to say that the regime's economy is on the verge of collapse, or that the well-entrenched Iranian leadership could be ousted in a popular uprising, she said.

For the moment, the United States and Iran are engaged in a test of wills. Iran could be forced to the negotiating table eventually to avoid more economic pain, but it would need a face-saving way back.

European diplomats and former officials say the Trump administration has not prepared the way for any serious negotiation, apart from offering a list of 12 demands that Tehran sees as a de facto surrender.

With Washington and Tehran trading threats, and Bolton touting a surge in U.S. forces in the Persian Gulf, the risk of an incident inadvertently triggering a full-blown conflict is growing, Goldenberg and other experts said.

In 2016, 10 U.S. sailors were captured after they strayed into Iranian waters by accident. Back then, the Obama administration spoke regularly to the regime. Secretary of State John Kerry got on the phone to his Iranian counterpart, Javad Zarif, and the sailors were released within hours, defusing a potential serious crisis.

"How does it end this time if Kerry and Zarif aren't talking on the phone?" Goldenberg said.

"What happens when we're not talking at all, and everyone is on hair-trigger alert?"