ANKARA, Turkey — Saudi Arabia, Turkey and Pakistan have signed a defense agreement on Friday, Pakistan’s Foreign Ministry, deepening cooperation between the three regional powers at a time of growing security concerns.

The agreement was signed during a meeting between Saudi Crown Prince Mohammed bin Salman, Turkish President Recep Tayyip Erdogan and Pakistan’s Prime Minister Shehbaz Sharif in Saudi Arabia.

“The Agreement is intended to strengthen collective deterrence against any act of aggression, and stipulates that any armed attack against any one of the three States shall be regarded as an attack against them all. It further provides for the enhancement of all aspects of defence cooperation among the three States,” the ministry said in a statement.

There were no immediate details of the agreement, which brings oil-rich Saudi Arabia together with nuclear power Pakistan as well as Turkey, which has NATO’s second-largest army and a rapidly growing defense industry.

Turkey’s Haberturk television said it is likely to allow joint military exercises and training, technology transfers and the sharing of intelligence. Other unconfirmed reports suggested the agreement would state that any aggression against either of the countries would be considered an aggression against all.

Saudi Arabia, whose critical infrastructure and oil facilities have come under attack as part of the war in Iran, has been looking to diversity its defense partnerships.

In September, Pakistan and Saudi Arabia signed a mutual defense pact that defines any attack on either nation as an attack on both.

The agreement also comes amid rising tensions between Turkey and Israel over Gaza and other regional conflicts, including the war in Iran and Lebanon.

Sharif arrived in Jeddah on Thursday for a three-day visit accompanied by a high-level delegation that includes Army Chief Field Marshal Asim Munir.

In addition to discussing ways to help defuse tensions between the United States and Iran, the three leaders are expected to explore expanding trade, economic ties and broader security cooperation, the officials said.

Pakistan’s Foreign Ministry said that while Sharif’s visit took place against the backdrop of heightened tensions in the Gulf, it extends beyond the immediate crisis and is aimed at strengthening bilateral relations and boosting coordination on regional and international issues.