Pakistan and Saudi Arabia signed a defense agreement Wednesday, vowing to regard an assault on either country as an attack on both.

The pact comes after rising tensions in the region following the Sept. 9 Israeli airstrike targeting Hamas in Qatar’s capital killed six people.

The agreement, called the "Strategic Mutual Defense Agreement,” was signed during Pakistan's Prime Minister Shehbaz Sharif’s visit to the kingdom, according to a joint statement issued after his talks with Saudi Crown Prince Mohammed bin Salman.

The agreement states that "any aggression against either country shall be considered an aggression against both,” according to a statement that was issued by Pakistan’s Ministry of Foreign Affairs in Islamabad.

Sharif traveled to Saudi Arabia at the invitation of the crown prince, the statement said.