Saudi Arabia, Turkey and Pakistan have signed a joint defence agreement, saying an attack on one of them would be seen as an attack on all three.

The pact was announced at a meeting between Saudi Crown Prince Mohammed bin Salman, Turkish President Recep Tayyip Erdogan and Pakistani PM Shehbaz Sharif in the Saudi city of Mecca.

The three countries have been looking to strengthen security ties as the war between the US and Iran has drawn in Saudi Arabia and disrupted shipping through the Strait of Hormuz and the Red Sea.

Saudi Arabia and Pakistan announced a joint defence pact last year.

Turkey's Recep Tayyip Erdogan (left) and Saudi Crown Prince Mohammed bin Salman (right) met ahead of the signing [Reuters]
Turkey's Recep Tayyip Erdogan (left) and Saudi Crown Prince Mohammed bin Salman (right) met ahead of the signing [Reuters]

Iran and its allies have launched attacks on targets in Saudi Arabia and other Gulf states and blockaded their shipments after the US and Israel attacked it on 28 February.

In Yemen, Iran-backed Houthi rebels – who control the north of the country - have been fighting government forces, which are backed by a Saudi-led coalition.

Last month the Houthis announced a "maritime embargo" against Saudi Arabia and targeted Saudi airports, oil facilities and tankers in the Red Sea.

Saudi Arabia has responded with strikes targeting Houthi positions and by forming a new naval coalition to protect shipping in the Red Sea and the Gulf of Aden.

Announcing the pact on Friday, Pakistan's foreign ministry said an attack on any of the three states "shall be regarded as an attack against them all".

The "Mecca Joint Defence Agreement" pledges mutual support between the three Sunni states, but provides no specifics on the obligations of each.

A Turkish official quoted by Reuters news agency said the pact was "purely defensive in nature".

The three countries have expressed concern as the conflict between Israel and Iran shows no sign of abating and their common ally, the US, struggles to contain regional repercussions.

Saudi Arabia brings the financial power and is one of the largest weapons purchasers.

Turkey is the second-largest military force in Nato, with an advanced defence production capacity. Pakistan has nuclear weapons.