The assurance comes after Saudi Arabia and several of its allies announced the severing or downgrading of diplomatic relations with Shia powerhouse Iran.
Pakistan stands with Saudi Arabia against any threat to its integrity and sovereignty, Prime Minister Nawaz Sharif has said as the two countries agreed to further strengthen the bilateral relations in various fields, including defence security and trade.
Sharif made the remarks in a statement after meeting Saudi deputy Crown Prince and Defence Minister Mohammad bin Salman.
Sharif welcoming the deputy Crown Prince said, "Saudi Arabia was held in high esteem by the people of Pakistan."
"The people of Pakistan would always stand with the people of Saudi Arabia, against any threat to the sovereignty and territorial integrity of the Kingdom," Sharif said.
The Prime Minister affirmed that people of Pakistan have bonds with the people of Saudi Arabia through historical, cultural and Islamic ties of brotherhood.
He welcomed the Saudi initiative to establish a coalition of like-minded Islamic countries to counter terrorism and militancy and informed the Deputy Crown Prince that Pakistan supports efforts to counter terrorism and extremism.
The two leaders agreed to further strengthen the bilateral relations between Pakistan and Saudi Arabia and deepen the cooperation in various fields, including defence security, fight against terrorism, trade and investment and manpower requirements of the Kingdom.
The Deputy Crown Prince appreciated the valiant efforts waged by the security and law enforcement authorities to root out terrorism from Pakistan, particularly through the military campaign Zarb-e-Azb.
He was briefed on the progress in implementing National Action Plan to eliminate extremism and terrorism.
It was agreed that the two countries would cooperate in developing an effective counter narrative to defeat the extremist mindset.
The Deputy Crown Prince also met army chief General Raheel Sharif who told that Pakistan would react strongly if there was direct threat to the integrity of Saudi Arabia.
The army chief also said that Pakistan enjoys close relations with Saudi Arabia and other Gulf Cooperation Council (GCC) countries and attaches great importance to their security.
Salman arrived on a day-long trip for seeking Pakistan's support as the Kingdom mulls additional steps against Iran. It was second high-profile trip from Saudi Arabia visitor this week after Foreign Minister Adel al-Jubeir visited on Thursday to seek support of Pakistan against Iran in the current tension and asked it to join 34-national alliance against terrorism.