Lebanese Prime Minister Saad Hariri resigned from his post Saturday during a trip to Saudi Arabia in a surprise move that plunged the country into uncertainty amid heightened regional tensions.

To really understand the Middle East - subscribe

Hariri's resignation follows an assassination attempt on his life a number of days ago, Al Arabiya has reported. According to the report, the attempt took place in Beirut but was thwarted. Saudi Arabia's Gulf Affairs Minister Thamer al-Sabhan said the Hariri's personal security detail had "confirmed information" of a plot to kill him.

>> Mounting tensions in Syria and Gaza throw Israel into a new state of emergency | Analysis

In a televised address from Riyadh, Hariri fired a vicious tirade against Iran and the Lebanese Hezbollah group for what he said was their meddling in Arab affairs and said "Iran's arms in the region will be cut off."

"The evil that Iran spreads in the region will backfire on it," Hariri said, accusing Tehran of spreading chaos, strife and destruction throughout the region.

>>Hariri's resignation increases instability on Israel's front with Hezbollah | Analysis

Hariri was appointed prime minister in late 2016 and headed a 30-member national unity cabinet that included the Shi'ite militant Hezbollah. The government has largely succeeded in protecting the country from the effects of the civil war in neighboring Syria.

>> What Israel wanted to achieve with threat of military intervention in syrian druze town | Analysis

Lebanese President Michel Aoun will ask Hariri to remain in his position until a replacement is found and is tasked with forming a government. In a statement, the presidential office said Aoun was informed by Hariri in a phone call of his resignation.

According to the Lebanese constitution, that person has to be a Sunni Muslim.

>>Is Saudi Arabia pushing Israel into war with Hezbollah and Iran? | Former U.S. envoy to Israel Dan Shapiro

The country is sharply divided along a camp loyal to Saudi Arabia, headed by the Sunni Muslim Hariri, and a camp loyal to Iran represented by Hezbollah. President Aoun, who was elected in October 2016 after more than two years of presidential vacuum, is a close ally of Hezbollah.

Hariri's resignation Saturday was expected to sharply raise tensions in the country. In his speech, he suggested he feared for his life and said the atmosphere in the country is similar to the one that existed before his father, the late prime minister Rafik Hariri, was assassinated in 2005.

Several Hezbollah members are being tried in absentia for the killing by a UN-backed tribunal in The Hague, Netherlands. Hezbollah denies any involvement.

He said Hezbollah's policies have put Lebanon "in the eye of the storm."

"Hezbollah was able in past decades to impose a status quo in Lebanon through its weapons directed at the chests of Syrians and Lebanese," he said. "I declare my resignation from the premiership of the Lebanese government, with the certainty that the will of the Lebanese is strong," Hariri said.

"When I took office, I promised you that I would seek to unite the Lebanese and end political division ... but I have been unable to do so. Despite my efforts, Iran continues to abuse Lebanon," he said.

In Beirut's Tarik al-Jadideh neighborhood, a predominantly Sunni neighborhood supportive of Hariri, residents described the shock resignation as a good step.

"Prime Minister Hariri has reached the stage where he is not able anymore to bear the pressure on Lebanon by Arab nations, due to the intervention of Iran," said Mohyeddine Awwad, sitting in a cafe where posters of Hariri hung.

In the first Iranian comment, Hossein Sheikholeslam, an adviser to Iran's foreign minister, described Hariri's resignation as unwise and said "it does not bode well for Lebanon." In comments to al-Alam TV, he said both the U.S. and Saudi Arabia are seeking an escalation.

Lebanese Druze leader Walid Jumblatt said on Saturday that Lebanon is too weak to bear the consequences of Saad al-Hariri's resignation as prime minister and that Lebanon cannot afford to side against Iran.

"I am concerned about the economy, of course, and I am concerned about politics. We cannot afford to fight the Iranians from Lebanon," Jumblatt told Reuters. He advocated compromise with Hezbollah in Lebanon while waiting for regional circumstances to allow Saudi-Iranian dialogue.

"Lebanon has enough problems. It is too weak for such a resignation, because it will have a tremendous negative impact," said Jumblatt, one of Lebanon's most influential politicians. He described Hariri's resignation as "incomprehensible."

The Druze are an important minority in Lebanon's sectarian system of government. Jumblatt has frequently played kingmaker in Lebanese politics.

Earlier this week, Saudi State Minister for Gulf Affairs Thamer al-Sabhan sharply criticized Hezbollah, calling for its "toppling" and promising "astonishing developments" in the coming days during an interview with the Lebanese TV station MTV.

Al-Sabhan met with Hariri in Saudi Arabia when the now resigned prime minister was visiting first earlier this week. Hariri abruptly returned to the kingdom later Friday before his bombshell announcement Saturday.

In tweets after meeting Hariri, al-Sabhan described it as "long and fruitful meeting" that resulted in agreements over many issues that concern the Lebanese. "What comes is better, God willing," al-Sabhan tweeted on Tuesday. In a series of tweets, al-Sabhan criticized the Lebanese government for tolerating Hezbollah's criticism of the kingdom.

He earlier said that those who cooperate with Hezbollah must be "punished."

The attacks on Hezbollah came on the heels of new U.S. sanctions on the group.