Relations between Iran and Pakistan have been strained in recent months, with both sides accusing each other of not doing enough to stamp out militants allegedly sheltering across the border.
A new umbrella group representing various insurgent outfits operating in Pakistan's southwestern Baluchistan province bordering Iran claimed responsibility for the attack on Thursday, when 14 passengers were killed after being kidnapped from buses on southwestern Pakistan.
The militants checked the identity cards of passengers, singled out some of them, and then kidnapped and killed them. The Baloch Raji Aajoi Saangar (BRAS) umbrella group said it targeted Pakistani navy and Coast Guard officials travelling on buses.
Pakistani Foreign Minister Shah Mahmood Qureshi said his country was angry about the attack and called for Iran to take action against BRAS militants.
"The training camps and logistical camps of this new alliance...are inside the Iranian border region," Qureshi told reporters in Islamabad.
Qureshi said he spoke to his Iranian counterpart, Mohammad Javad Zarif, and conveyed to him the "anger of Pakistani nation".
Iranian officials could not be reached for comment. Iran's state news agency IRNA confirmed the two men spoke.
"Iran's foreign minister condemned the recent terrorist attack on Pakistan’s military and security forces, and expressed sympathy for the Pakistani government and people," IRNA reported.
Pakistani premier Imran Khan is due to arrive in Tehran on Sunday for a two-day visit.
Relations between Pakistan and Iran have been strained in recent months after a suicide bomber killed 27 members of Iran’s elite Revolutionary Guards in mid-February in a southeastern region, with Iranian officials saying the attackers were based inside Pakistan.
The Sunni group Jaish al Adl (Army of Justice), which says it seeks greater rights and better living conditions for the ethnic Baloch minority, claimed responsibility for that attack.
Iran's Shi'ite Muslim authorities say militant groups operate from safe havens in Pakistan and have repeatedly called on the neighbouring country to crack down on them.
Ethnic Baloch people straddle the porous and lengthy Iran-Pakistan border, with many insurgent groups crisscrossing the border to the annoyance of authorities.
Qureshi said Pakistan has decide to fence the border, just as it has started fencing its frontier with Afghanistan.
"The work has already started from the points that are frequently misused," Qureshi said. "We intend to seal this whole border which spreads to 950 kilometres, gradually."