Saudi Arabia, Turkey and Pakistan signed a joint defense agreement in Mecca on Friday against the backdrop of the Iran conflict, marking the first time the region’s leading Sunni powers have inked a formal military pact. Under its terms, an attack on any of the three states will be regarded as an attack on them all, the Pakistani Foreign Ministry said in a statement. Saudi Arabia is among the worst-hit Gulf states targeted by Iran and its proxy Shiite militias in Iraq since the start of the war in late February.Turkish President Recep Tayyip Erdogan, Saudi Crown Prince Mohammed bin Salman and Pakistani Prime Minister Shehbaz Sharif signed the document in Mecca. Turkey, a NATO member, has the alliance’s second-largest standing army, Pakistan is the Muslim world’s sole nuclear power, and Saudi Arabia is the custodian of Mecca and Medina, where the Prophet Mohammad is buried. The timing and venue of the signing — on a Friday, the Muslim holy day of prayer, in Mecca — underscore the symbolism of an agreement among three of the Muslim world's leading Sunni states. Diplomats in the region briefing Al-Monitor on background said there is little doubt that the pact is aimed at countering Shiite Iran’s influence.Rayed Krimly, Saudi deputy minister for public diplomacy, stressed in a post on X that the agreement did not “represent an effort to establish a military axis or a sectarian bloc,” nor did it “constitute a threat to the security of any country in the region.”Israel, however, is also likely to perceive the agreement as a threat in light of its steadily deteriorating ties with Turkey, the only country of the three that formally recognizes the Jewish state.The risk of open conflict between the United States’ top regional allies is being increasingly debated, but still discounted as unlikely, amid a war of words between Israeli and Turkish leaders. “From Israel's perspective, it is a very worrying development,” said Gallia Lindenstrauss, a senior researcher at the Institute for National Security Studies in Israel who closely monitors Turkey. “It adds a military component to a political front that has presented a firm anti-Israel stance. It is also concerning as both Saudi Arabia and Turkey are potentially looking into the nuclear dimension and have much to gain from close defense cooperation with Pakistan.”“While not closing the door to Israel-Saudi normalization, it makes it less likely. Israeli-Saudi normalization would likely have also brought with it an improvement in Turkey-Israel relations as a byproduct, so this is now also less likely," Lindenstrauss told Al-Monitor.The Trump administration announced in July that it had signed a civilian nuclear agreement with Saudi Arabia but walked it back soon after, saying it would only go into effect when Saudi Arabia joined the Abraham Accords. Meanwhile, Russia is building Turkey’s first nuclear power plant on the Mediterranean Sea. Both countries are signatories to the Nuclear Non-Proliferation Treaty.Friday’s signing follows Saudi Arabia’s announcement last week of a maritime defense coalition for the Red Sea, Bab al-Mandeb and Gulf of Aden called the Multinational Maritime Defense Coalition. Turkey and Pakistan are among 14 countries that signed the joint communique in Riyadh announcing its formation. The coalition will meet again Aug. 12–13 to finalize its institutional framework, the Saudi Arabian Foreign Ministry said.Today’s pact, however, is separate from the maritime coalition. Rather it is a tripartite agreement that builds on one signed in September of last year between Pakistan and Saudi Arabia, Al-Monitor has learned. In April, Pakistan deployed a squadron of fighter jets as well as Chinese-made air defense systems to a Saudi airbase. An immediate question is whether Turkey will deploy forces, including naval assets, to Saudi Arabia as well. This would expand its military presence around the Horn of Africa, where it has its largest overseas base, in Somalia. Turkey also has an undisclosed number of troops based in Qatar.The combined moves point to Saudi Arabia’s mounting vulnerability in the face of attacks not only from Iran and Shiite militias in Iraq but more recently from Tehran’s other ally, the Houthis, who have rekindled attacks against the kingdom and declared an embargo on Saudi goods transiting the Bab al-Mandeb. Diplomats in the region said that squeezed between Iran’s chokehold over the Strait of Hormuz, Houthi aggression in the Bab al-Mandeb and the Trump administration’s erratic behavior, Riyadh has felt compelled to turn elsewhere to beef up its defenses.The United States, which has troops in both Turkey and Saudi Arabia, was invited to join the Red Sea grouping, but like most of the 51 countries on Riyadh’s guest list, has yet to formally commit itself. The Department of Defense did not respond to Al-Monitor’s request for comment regarding the tripartite defense accord.But would either Turkey and Pakistan actually engage in direct attacks on the Houthis, and in so doing openly confront their biggest sponsor, Iran? The answer, the diplomatic sources said, is most likely a big “no,” despite the provision that an attack on one would be seen as an attack on all.“That is a claim to be tested,” one of the sources said. It could well end up repeating the miscalculations of the Gulf Cooperation Council, which was formed in 1981 at the start of the Iran-Iraq War by Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, and the United Arab Emirates. The belief back then was that “they could collectively deal with Iran with the United States as their primary partner. Did they succeed,” one of the diplomatic sources asked? “The GCC’s assumption was they can contain Iran, sanction Iran and write all the rules of the road. But when Iran retaliates by hitting US bases in their territories and attacking their infrastructure [in the current Iran war], they say ‘Oh’ and ask if they can negotiate.”Moreover, without US buy-in, such arrangements tend to be toothless, and any pact that threatens Israel will by default not get US buy-in, the same source contended. Its religious overtones clearly won’t help either. “Anyone with half a brain would have kept Mecca out of it,” the source said.This might explain why Egypt, under its determinedly anti-Islamist President Abdel Fattah al-Sisi, has not joined the pact, despite being part of the emerging “Quad” — along with Riyadh, Ankara, and Islamabad — to counter Emirati and Israeli influence in the Red Sea and the Horn of Africa.Burcu Ozcelik, a senior fellow who focuses on Middle East and Turkish security affairs at the Royal United Services Institute in London, countered on X that the pact “fits the broader US preference for greater regional burden-sharing, regional powers assuming more responsibility for deterrence and security while remaining embedded to different degrees.”In the final analysis, the pact is aimed at deterrence, not aggression, which is Saudi Arabia’s principle objective at this time. For Turkey and Pakistan, it has the benefit of allowing both to project greater military might, and to receive Saudi largesse as they struggle with ailing economies, without putting their troops in the direct line of fire. Both Pakistan and Turkey have solid if complicated ties with Tehran, making both countries unlikely targets in what would be new and messier fronts for Iran in the present conflict. This developing story has been updated.