Lebanon has stayed away from the inaugural summit of a military alliance formed by Saudi Arabia as the fallout from Riyadh's escalation of pressure on Beirut keeps growing.

An official source said Lebanon received an official invitation to the summit of the Islamic Military Alliance, which was held in Riyadh on Sunday, but “decided not to attend as part of implementing its dissociation policy.”

The source also denied reports that Lebanon’s President Michel Aoun had asked Defense Minister Yaacoub Sarraf not to attend the meeting.

Sarraf met separately with Aoun and Prime Minister Saad Hariri on Friday before heading to Romania Sunday to sign a military cooperation agreement.

After returning to Lebanon from Saudi Arabia, Hariri put his surprise resignation on hold and stated that his government was going to prioritize Lebanon's interests over regional challenges.

Hariri stunned Lebanon by announcing his resignation in a live television broadcast from Saudi Arabia on November 4. Senior sources close to Hariri and top Lebanese officials said Riyadh had coerced Hariri into stepping down and put him under house arrest.

The development was followed by a steep escalation in Saudi statements, accusing the Lebanese government of declaring a war on the kingdom because of including Hezbollah in its make-up.

Saudi Arabia also urged its citizens visiting or residing in Lebanon to leave the country immediately and advised all citizens against traveling there.

A handout picture provided by the Saudi Royal Palace on November 26, 2017 shows Saudi Crown Prince and Defense Minister Mohammed bin Salman speaking at the meeting of defense ministers of the Saudi-led coalition in the capital Riyadh. (Photo by AFP)

In his keynote speech at the alliance’s first meeting, Saudi Arabia’s Crown Prince Mohammed, who is also the defense minister, vowed to “pursue terrorists until they are wiped from the face of the earth.”

“In past years, terrorism has been functioning in all of our countries ... with no coordination” among national authorities, he said, adding “this ends today, with this alliance.”

Saudi Arabia has been waging an extremely destructive war on Yemen since 2015 with the aim of crushing Houthi fighters. The ferocious bombing campaign has been going on in the name of the coalition but apart from the UAE, other members have no active role in it.

The Saudi-led coalition, which is claimed to have some 40 members, was formed in 2015 to fight terrorism amid criticism that Arab states were not doing enough to fight Daesh.

The Takfiri ideology which inspires Daesh has its roots in Wahhabism, freely preached and promoted in Saudi Arabia by many extremist muftis who are mostly close to the ruling family.

On Friday, an elaborate attack on a Sufi mosque in northern Sinai in Egypt killed more than 300 people. Egyptian officials say the attackers had long beards and hair and carried Daesh flags.

The US and Saudi Arabia, along with their some regional allies, stand accused of providing weapons and financial backing to various militant groups wreaking havoc in countries like Syria and Iraq.

Qatar, which is a member of the alliance, has not sent a representative to the conference.

Saudi Arabia, Egypt, Bahrain and the UAE cut diplomatic ties with Qatar in June and slapped an economic embargo on the country, accusing it of supporting terrorism. Doha has rejected the accusation, saying it was being targeted for following an independent policy.