Washington (CNN) President Donald Trump and his national security adviser, John Bolton, are engaged in an ongoing debate about how to handle Iran, a senior White House official told CNN.

Trump moved to ease tensions with Iran on Thursday morning after Tehran downed a US drone near the Persian Gulf. In doing so, he struck a starkly different tone on Iran from Bolton and other senior security aides.

After months of escalating steps by Iran and the US, Trump said Iran's attack on the drone was probably an unintentional "mistake." The President's tempered response stands in stark contrast to harsh public warnings from Secretary of State Mike Pompeo and particularly the views of Bolton, who has publicly and repeatedly called for regime change in Tehran in the past.

The senior White House official said that in the Iran debate between Trump and Bolton, officials such as Pompeo, Vice President Mike Pence and incoming acting Secretary of Defense Mark Esper play the role of "swing votes."

'A triangulator'

A senior diplomatic source of a US ally echoed the observation about Pompeo, telling CNN that the secretary of state acts as "a triangulator" between Bolton and Trump when it comes to Iran.

"From what we've seen, Pompeo has made an effort to be a sort of triangulator between Bolton's well-known views and the President -- somewhere in between," the diplomatic source said.

"The President has demonstrated a preternatural risk-aversion when it comes to use of military force and wants to get out of unwinnable old wars and not get into new ones," said Aaron David Miller, a senior vice president at the Wilson Center. "In contrast, John Bolton has been a hawk on Iran his entire professional life."

Pompeo isn't likely to counter calls for a military strike, said Miller, a CNN analyst.

"Pompeo has been very tough on Iran publicly and as secretary of state would manage the negotiations if there were any," Miller said. "But he'd unlikely push back hard against those who were recommending a military strike. In the end, the biggest constraint against one is the President himself."

As the administration's Iran policy has unfolded, Pompeo and Bolton have played a crucial behind-the-scenes role in shaping the response, according to US officials.

Their influence on national security policy has grown stronger with the high numbers of officials in "acting" positions, including acting Defense Secretary Patrick Shanahan, who will be replaced by Esper. The departures of officials once seen as exerting a moderating influence on the President have also served to increase their influence.

In recent weeks, Pompeo and other senior officials have reportedly been making the argument that the President has the legal authority to take military action against Iran without Congress' approval -- even as Trump himself has made overtures to Iran about diplomatic talks.

'These endless wars'

On Thursday, the President reminded reporters that "I want to get out of these endless wars. I campaign on that."

Fred Fleitz, a longtime Bolton ally who previously served as his chief of staff on the Trump administration's National Security Council, defended his former boss, telling CNN that Bolton is very aware that the President does not want to get the US into more wars, including a conflict with Iran.

Bolton, he said, is focused on carrying out Trump's foreign policy goals with that understanding.

Bolton "has made it very clear that he is a member of the President's team and carries out the President's foreign policy. ... This idea he might not be or might be carrying out policies the President doesn't approve of is just absolutely false," he added.

"John Bolton has a special relationship with the President and it is a relationship of trust and discretion," Fleitz said, and added that "this President does not want to start wars, he wants to get us out of wars. He'd like to start diplomacy with Iran and he's sincere about that."

'Real risks'

The apparent splits within the Trump administration and recent pushback from Iran -- including the drone downing and accusations from the US that Tehran is behind recent attacks on oil tankers -- create real risks, said John Kirby, a retired Navy admiral who's a CNN military and diplomatic analyst.

"What worries me is that the President's decision space gets further limited and smaller," Kirby said. "Some of it is of his own doing and the fact that his own team is not on the same page, but also now the Iranians are closing that decision space and they are pushing him into a corner, and I don't think that is good for anybody."

Barbara Slavin, director at the Future of Iran Initiative at the Atlantic Council, said, "Trump has the ultimate responsibility. He's the one who quit the nuclear deal, he's the one who imposed the oil embargo" against Iran in May, choking the economy's central artery.

Slavin notes that Trump also "got rid of the people" who espoused more moderate views, including former Defense Secretary Jim Mattis, former Secretary of State Rex Tillerson and former national security adviser H.R. McMaster.

Map of the location where a U.S. drone was shot down by Iran on Thursday, and the location where the missile was launched, provided by the Defense Department.

Bolton and Pompeo are "ideologues" when it comes to Iran, Slavin said. "Bolton, in particular, has a track record of supporting violent regime change in Iran and taking hundreds of thousands of dollars from a military cult that supports violent regime change," Slavin said, referring to the People's Mujahedeen of Iran, or MEK, an opposition group whose mission is to overthrow the regime.

That group, designated as a terror organization by the US government until 2012, featured Trump's personal lawyer Rudy Giuliani as a speaker in June 2018, just a month after Trump had left the internationally backed Iran nuclear deal. Giuliani called for regime change in Iran before the crowd, as has Bolton.

Shortly before Bolton became national security adviser, he told the MEK at its annual gathering in 2017 that "the only solution is to change the regime itself ... that's why before 2019 we here will celebrate in Tehran." He has also told MEK crowds that "the declared policy of the United States of America should be the overthrow of the mullah's regime in Tehran."

'We are fully prepared to respond'

Bolton came to the White House with the baggage of having been part of the George W. Bush administration team that led the US into war in Iraq, in part on the basis of false claims that Saddam Hussein had weapons of mass destruction.

Inside the White House, the national security adviser has tempered his message on Iran to say the US doesn't seek regime change and has not said much publicly. But he has requested that the Pentagon draft plans to send more than 100,000 troops to the Middle East, according to The New York Times , and announced the May deployment of a strike group to the region.

"The United States is not seeking war with the Iranian regime," Bolton said in a White House statement, "but we are fully prepared to respond to any attack, whether by proxy, the Islamic Revolutionary Guard Corps, or regular Iranian forces."

He also issued a special video message in February, on the 40th anniversary of the founding of the Islamic Republic, in which he told Iran's leader that "you are responsible for terrorizing your own people and terrorizing the world as a whole, I don't think you'll have many more anniversaries left to enjoy."

The Washington Post has reported that Bolton has dominated Iran policy, sharply limiting the information that Trump sees and minimizing Situation Room meetings where top officials discuss policy.

Pompeo has also been involved in ratcheting up the pressure on Iran through sanctions, messaging and military planning, flying to US Central Command this week to discuss regional security with military leaders.

The senior diplomatic source said Pompeo "maintains that the goal is reestablishing deterrence, but that is still very risky."