In a Friday statement, Mousavi offered sympathy to the Pakistani government, nation, and army, and the bereaved families of the victims.

Heavily-armed assailants on Thursday shot dead at least 14 Pakistani Navy personnel after pulling them from several passenger buses on the Makran coastal highway between Karachi and the Gwadar port in Balochistan.

"Terrorism is an ominous phenomenon, which will not be eradicated unless through an all-out cooperation among the countries that have fallen victim to it," Mousavi said.

He also expressed Tehran’s preparedness for any cooperation with the brotherly government of Pakistan in all intelligence, security, and operational aspects of fight against terrorism.

Iranian Foreign Minister Mohammad Javad Zarif also condemned the heinous attack on Friday ahead of the first and historic visit by Pakistani Prime Minister Imran Khan to Iran.

"Terrorists, extremists and their sponsors are terrified by close relations between Muslim states," Zarif said in a post on his official Twitter account on Friday.

The top Iranian diplomat reaffirmed the Islamic Republic's support for the Pakistani government and nation.