Iran welcomed a Russian-brokered deal to end the Nagorno-Karabakh conflict between its northern neighbours Armenia and Azerbaijan and called for "foreign fighters" to pull out of the region.

The accord ended six weeks of fierce clashes between Baku and Yerevan over the disputed region that left hundreds dead.

Iran s foreign ministry, in a statement, hailed the agreement "which led to the ceasefire and halt in hostilities".

Tehran hoped the deal would "lead to final measures for the establishment of sustainable peace in the Caucasus region".

It called for "respect for sovereignty and territorial integrity, no change to official international borders, the liberation of occupied territories, return of the displaced, and respect for the security and rights of minorities".

The ministry stressed the need for "the withdrawal of all takfiri forces and foreign fighters from the region".

The term "takfiri" is used by Iranian authorities to refer to Sunni jihadists.

President Hassan 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 pro-Turkey militants from Syria in the Karabakh conflict.

Iran deployed troops along its border with Azerbaijan and Armenia in the country s northwest following stray fire from the Karabakh fighting.