Turkey and Qatar signed a mutual defence agreement on Friday, pledging a unified stance against any external armed attack targeting either country, according to a joint statement issued after talks between their leaders in Istanbul.

The agreement is aimed at strengthening collective defence and promoting regional security. The two sides agreed to consult on threats to their security, as well as on regional and global security issues and defence policies, and to expand cooperation through joint military exercises, defence industry projects and personnel training exchanges.

Turkish President Recep Tayyip Erdogan signed the accord during a meeting with Qatari Emir Sheikh Tamim bin Hamad al-Thani. Qatar's ruler travelled to Istanbul after attending the United Nations COP31 climate summit in southern Turkey.

In a joint communique issued after the 12th session of the two countries' Supreme Strategic Committee, Turkey and Qatar said the agreement reflected their commitment to safeguarding their sovereignty and territorial integrity, along with a shared vision of a more secure and stable regional order.

"President Erdogan stated that we would continue working together to prevent the resurgence of war in the Gulf region and establish a basis for dialogue and achieve peace," the Turkish presidency said in a statement on X.

The countries also expressed readiness to pursue energy cooperation, particularly in liquefied natural gas trade, building on their long-standing relationship. The Turkish presidency said Ankara and Doha were working to develop and diversify their energy partnership, and that their cooperation in the defence industry would continue to grow.

The pact follows the Mecca Joint Defence Agreement signed in August by Turkey, Saudi Arabia and Pakistan, which brought together the Sunni Muslim US allies at a time of conflict across the region.

Ratified by the Turkish parliament last week, that agreement links NATO member Turkey, which has the alliance's second-largest military, with Pakistan, the Muslim world's only nuclear-armed state, and Saudi Arabia, the Gulf's leading power. Under the August deal, an attack on one party constitutes an attack on all.

The Mecca pact clears the way for Ankara to send military support to Saudi Arabia, which has been struggling to fend off attacks by Yemen's Iran-backed Houthi militants. Turkey has said that agreement is not aimed at any other country and remains open to other states, including Egypt.