He blamed the killing of the country's supreme leader and other top officials for what sounded like a loss of command and control in the armed forces in recent days.
Iran's president said Saturday that a demand by the United States for an unconditional surrender is a "dream that they should take to their grave".
President Masoud Pezeshkian made the statement in a pre-recorded address aired by state television.
He also apologised for Iran's attacks on regional countries, saying that Tehran would halt them and suggesting they were caused by miscommunication in the ranks.
READ MORE: Israel hammers Beirut and Tehran as Iran attacks more Israeli targets๏ปฟ
He blamed the killing of the country's supreme leader and other top officials for what sounded like a loss of command and control in the armed forces in recent days.
Pezeshkian's statement on Saturday said the country's three-man leadership council had been in touch with the armed forces over the attacks.
"I should apologise to the neighbouring countries that were attacked by Iran, on my own behalf," the president said.
"From now on, they should not attack neighbouring countries or fire missiles at them, unless we are attacked by those countries. I think we should solve this through diplomacy."
Iran's paramilitary Revolutionary Guard, which has been at the forefront of the war, answers only to the country's supreme leader. However, an Israeli airstrike killed Supreme Leader Ayatollah Ali Khamenei, 86, at the start of the war February 28.
The comments came as intense Iranian fire targeted the Gulf Arab states early Saturday as Israel and the United States kept up their airstrikes targeting the Islamic Republic.
There were repeated attacks Saturday morning on Bahrain, Saudi Arabia and the United Arab Emirates.
NEVER MISS A STORY: Get your breaking news and exclusive stories first by following us across all platforms.
- Download the 9NEWS App here via Apple and Google Play
- Make 9News your preferred source on Google by ticking this box here
- Sign up to our breaking newsletter here

