Iran's Khamenei says Armenia-held land in Karabakh 'must be returned'
Hundreds of people have been killed since new fighting erupted in late September over the disputed Karabakh region, which broke from Azerbaijan's control during a war in the 1990s.
"Territories seized by Armenia must be returned and liberated. This is an essential condition," Khamenei said in a televised address. "These lands belong to Azerbaijan, which has every right over them."
Khamenei added that "the security of Armenians who live in these lands must be ensured", urging the warring parties to respect international borders.
"This war... threatens the security of the region," he said. "It must end as soon as possible."
Iran has good relations with both countries and has repeatedly called on the two sides to cease hostilities. Tehran has also offered to facilitate talks.
"Everyone" must "accept the reality... and respect other countries' territorial integrity", Rouhani had said.
According to some estimates, Azeris make up 10 million of the 80-million population of Iran, which is also home to almost 100,000 Armenians.
Khamenei also warned Tuesday that "terrorists must not set up in proximity to our borders", echoing Rouhani's earlier comments.
"The presence of such terrorists has been highlighted by trustworthy information," Khamenei said.
"If we feel a threat from them, we will react firmly and unequivocally."
Rouhani last month warned Iran would not tolerate "terrorists" near its border with Azerbaijan, after France and Russia raised the alarm over the deployment of militants from Syria to the Karabakh conflict.