The agreement stipulates that an armed attack against any of the three would be regarded as an attack on all, they said in a joint statement.
While the statement did not give specifics on the commitments or obligations each had accepted under the "Mecca Joint Defence Agreement", it said the pact was aimed at strengthening their collective security and promoting peace, security and stability in the region and beyond.
However, the statement did not give specifics on the commitments each had accepted and it was not clear how far their agreement would bind them to any particular military action in each other's defence.
Turkish Vice President Cevdet Yilmaz said the agreement was not aimed at any specific country. A Turkish official added that it was purely defensive and did not abrogate any existing agreements the countries had with other states.
Turkey has NATO's second-largest military. Saudi Arabia, the strongest Gulf state, is one of the world's top oil exporters, while Pakistan is the only nuclear-armed Muslim country.
