Pakistan and Iran agreed to cool tensions after exchanging fire earlier this week, which raised alarm about a possible widening conflict in the Middle East. The two countries’ respective foreign ministers spoke over the phone on Friday, agreeing to strengthen cooperative counter-terrorism measures “and other aspects of mutual concern,” according to a statement by Pakistan’s foreign ministry. “The return of ambassadors of the two countries to their respective capitals was also discussed,” the Islamabad detail said. Pakistan recalled its ambassador from Tehran on Wednesday— after Iran struck militant bases used by a Sunni Muslim group in the country’s southwest—and blocked the Iranian envoy from returning to his post in Islamabad. On Thursday, Pakistan retaliated with airstrikes on “terrorist hideouts” in Iran near the Pakistani border. The increased armed conflict fueled fears of expanding violence in the Middle East on the heels of Israel’s military offensive in the Gaza Strip.