Image copyright Twitter Image caption A video broadcast by al-Arabiya TV in February showed the kidnapped soldiers.

Four Iranian soldiers seized by Sunni militants and taken into Pakistan have been freed, officials say.

The border guards abducted by Jaish al-Adl in February were handed over to Iranian officials but the militants said they had killed a fifth man.

The abductions had heightened regional and sectarian tensions.

Iran accused Pakistan of not doing enough to free the man and had threatened to send troops over the border to rescue them.

"The soldiers were handed over some hours ago by the small terrorist group Jaish-ul Adl to Iranian representatives in Pakistan," Iran's Fars news agency reported on Friday.

Jaish-ul Adl said on its Twitter account that it had freed the soldiers "at the request of eminent Sunni clerics in Iran".

Image copyright AP Image caption Iranian border guards

The five soldiers, who were doing their 24-month mandatory military service, were abducted in Iran's south-eastern province of Sistan Baluchistan, which borders both Afghanistan and Pakistan.

The militants had demanded that Iranian authorities free 300 Sunni prisoners held by Iran and its close ally Syria in exchange for the guards.

Last month, the group announced it had executed one of the five men and warned of more executions to come unless Iran freed the prisoners.

The guards were taken into neighbouring Pakistan after being kidnapped on 6 February, prompting Iran to warn it was considering sending troops across the border to free them.

The incident strained relations between the neighbours, with Iran denouncing what it said was Pakistan's inability to secure its own borders.

Jaish-ul Adl, whose name in Arabic means "Army of Justice," took up arms in 2012 to fight for what it says are the rights of Iran's minority Sunni population.

Sistan Baluchistan, which is home to a large Sunni minority, has been the scene of frequent clashes in recent years between Iranian security forces and drug smugglers and Sunni rebel groups.

In October 2013, Jaish al-Adl said it was behind the killing of 14 Iranian border guards and the capture of three others in Sistan Baluchistan.

The authorities in the provincial capital, Zahedan, responded by hanging 16 people they claimed were "linked to groups hostile to the regime".

In November, Jaish al-Adl shot dead a local prosecutor and his driver. The next month, a bomb blast killed three Revolutionary Guards.