Iran's Revolutionary Guards said Sunday they have deployed troops along the border with Azerbaijan and Armenia, following stray fire from the fighting over Nagorno-Karabakh.
"Units of (the Guards) ground forces have been dispatched to and stationed in the region," their commander Brigadier General Mohammad Pakpour said, quoted by state news agency IRNA.
Their mission was "to protect national interests and maintain peace and security".
Pakpour said Iran respects its neighbours' territorial integrity but that "any shift in border geopolitics is the Islamic Republic of Iran's red line".
The commander visited the border county of Khoda Afarin on Saturday, the Guards' website Sepahnews reported.
The region in Iran's East Azerbaijan province borders territory in Azerbaijan adjacent to Nagorno-Karabakh.
Khoda Afrin and nearby villages have reportedly been hit by stray cross-border mortar fire.
"If there is any repetition of such fire, the Islamic Republic of Iran will not remain indifferent," foreign ministry spokesman Saeed Khatibzadeh warned on October 16.
In the first week of the fighting, mortar rounds repeatedly strayed across the border, with one wounding a six-year-old child.
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.
Both sides have defied international calls for a ceasefire since all-out war erupted on September 27.
On Thursday, Azerbaijan said it had taken full control of its border with Iran as Baku pressed its assault on Nagorno-Karabakh, driving out Armenian forces near the frontier.
Armenia also borders northwest Iran.