Iran warned on Saturday against any "intrusion" by Armenian and Azerbaijani forces fighting over the disputed Nagorno-Karabakh region after mortar fire hit Iranian villages along the border.
"Any intrusion upon our country's territory by either side of the conflict is intolerable (and) we seriously warn all sides to take the necessary precautions in this regard," foreign ministry spokesman Saeed Khatibzadeh said in a statement.
He called for an end to the fighting between the two countries and said Iran stood ready to facilitate talks.
Armenia and Azerbaijan have for decades been locked in a conflict over Nagorno-Karabakh, an ethnically Armenian region of Azerbaijan which broke away from Baku in a 1990s war that claimed the lives of some 30,000 people.
Both sides have defied international calls for a ceasefire and accused the other of starting the new flare-up that began last Sunday and has seen the heaviest fighting since a 1994 ceasefire.
Iran does not border directly with Nagorno-Karabakh, but it does border adjacent Armenian-held areas of Azerbaijan which have seen fighting over the past week.
Several mortar rounds have hit Iranian villages since Monday, according to state news agency IRNA.
On Wednesday, a six-year-old child was wounded when five mortar rounds hit the village of Parviz Khanlu in Iran's East Azerbaijan province.
According to IRNA, "a large number" of those living along the border in Ardebil province "watch the firefight between Azeris and Armenians every day".
Ardebil's deputy governor Behrouz Nedayi has called on citizens to stay away from the conflict zone "given the intensity of the fighting