Images broadcast on state television on Tuesday showed Rouhani sitting in the cockpit of the new Kowsar fourth-generation fighter at the National Defence Industry exhibition in Tehran.
State media said it had “advanced avionics” and multi-purpose radar, and it was “100-percent indigenously made” for the first time.
Footage of the Kowsar’s test flights was circulated by various official media.
But live footage of the plane taxiing along a runway at the defence show was cut before it took off.
“When I speak of our readiness to defend, it means we seek lasting peace. If we lack readiness, we welcome war,” Rouhani said in a televised speech shortly after.
“Some think when we increase our military power, this means we seek war. [But] this is peace-seeking because we don’t war to happen,” he added.
“If we don’t have a deterrent … it gives a green light for others to enter this country.”
‘We have learned’
Defence Minister Amir Hatami said the aircraft programme was motivated by memories of air strikes Iran suffered during its eight-year war with Iraq in the 1980s, and by repeated threats from Israel and the United States that “all options are on the table” in dealing with Iran.
“We have learned in the [Iran-Iraq] war that we cannot rely on anyone but ourselves. Our resources are limited and we are committed to establishing security at a minimum cost,” he said in a televised interview.
The US has sold hundreds of billions of dollars of weapons to Iran’s regional rivals, but has demanded that Tehran curb its defence programmes, and is in the process of reimposing crippling sanctions in a bid to force its capitulation.
Rouhani said Iran must show restraint as well as deterrence, in an apparent swipe at his hardline opponents who seek to provoke the US with aggressive slogans.
“With a couple of sentences one can start a fight. With a couple of military moves one can enter confrontation. But then it will be costly,” he said. “The skill is to protect the country with minimum cost.”
Following the withdrawal of the United States from the 2015 nuclear deal in May, Iran has avoided an aggressive response and sought to maintain its good will with other international partners who oppose Washington’s move.
Rouhani said US pressure was also a spur to action.
“Why does America impose economic sanctions on us? Why does it impose them on Turkey? Why does it drag China into an economic war? Because it feels each one of them has a weak point. We must fix our weak points.”