Adviser to Rouhani says Trump's dismissal of National Security Adviser shows US failure when it comes to Iran.

Iran on Tuesday welcomed US President Donald Trump’s dismissal of his National Security Adviser John Bolton, with a senior official claiming the dismissal showed the failure of Washington’s policy on Iran.

“The marginalization and subsequent elimination of Bolton is not an accident but a decisive sign of the failure of the US maximum pressure strategy in the face of the constructive resistance of Iran,” said Hesameddin Ashena, an adviser to Iranian President Hassan Rouhani, according to Reuters.

“John Bolton had promised months ago that Iran would last for another three months. We are still standing and he is gone,” Iranian government spokesman Ali Rabiei added in a post on Twitter.

“With the expulsion of the biggest proponent of war and economic terrorism, the White House will face fewer obstacles in understanding Iran’s realities,” Rabiei said.

Trump announced on Twitter earlier on Tuesday that Bolton had been fired due to disagreements with many of Bolton’s suggestions.

"I informed John Bolton last night that his services are no longer needed at the White House. I disagreed strongly with many of his suggestions, as did others in the Administration, and therefore I asked John for his resignation, which was given to me this morning," Trump wrote.

"I thank John very much for his service. I will be naming a new National Security Advisor next week," he added.

Bolton responded by claiming: "I offered to resign last night and President Trump said, 'Let's talk about it tomorrow.'"

Bolton's firing follows the surprise announcement over the weekend that the Trump Administration had invited delegations from Afghanistan to Camp David for peace talks, including representatives of the Taliban, and that President Trump had cancelled the negotiations.

Bolton had opposed the negotiations with the Taliban, according to CNN.

Asked by an American reporter about Bolton’s firing, Iranian Foreign Minister Mohammad Javad Zarif said on Tuesday, “We will not be issuing any statement on US internal affairs.”

Zarif has in the past asserted that a so-called “B-team” including Bolton and Prime Minister Binyamin Netanyahu could goad Trump into a conflict with Tehran.