Iran has no intention of committing acts of aggression but retains the right to defend itself militarily, President Hassan Rouhani said Friday.

Speaking at a parade to mark Army Day, Rouhani delivered a peaceful message that referenced negotiations with leading powers aimed at securing a permanent deal to resolve a decade-long impasse over Tehran's nuclear programme.

"The neighbours should know that the Iranian military wants stability in the region," he said.

"During the nuclear talks we told the world we do not want to attack anyone and we do not want war."

Although the speech was preceded by fighter jets passing overhead, and followed by a procession of missiles and other military hardware on trucks, Rouhani's tone contrasted sharply with the often bellicose rhetoric of his predecessor Mahmoud Ahmadinejad, who routinely took aim at Israel.

"We are people of reason and dialogue," Rouhani said.

"Over the past two centuries Iran has never attacked anyone, but we have always confronted aggressors."

Since coming to power last August, Rouhani, seen as a moderate determined to revive Iran's sanctions-ravaged economy, has presided over a delicate thaw in relations with the West.

Under a preliminary deal signed last November, Iran agreed to freeze some nuclear activities for six months, which led to modest sanctions relief and a promise from Western states of no new restrictions on its hard-hit economy.

Iran's talks with the P5 +1 powers -- the United States, Russia, China, Britain, France and Germany -- will resume on May 13, with leaders seeking a lasting accord to end a long-running international standoff over the country's nuclear activities.

Iran has always denied allegations by Western nations and Israel that it is secretly pursuing a nuclear weapons capability alongside its civilian programme.