BEIRUT -- 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.

In a televised address from Riyadh, Hariri fired a vicious tirade against Iran and its Lebanese proxy 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.

Get Breaking News Delivered to Your Inbox

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

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 Michel Aoun, who was elected in October 2016 after more than two years of presidential vacuum, is a close ally of Hezbollah.

His election was made possible after Hariri endorsed him for president, based on an understanding that Aoun would then appoint him as prime minister.

In a statement, the presidential office said Aoun was informed by Hariri in a phone call of his resignation, adding that the president now awaits Hariri's return to the country to clarify the circumstances of his resignation and proceed accordingly.

Hariri's bombshell resignation Saturday was expected to raise tensions in the country and ushers in a stage of deep uncertainty and potential instability. It comes amid a sharp escalation in Saudi rhetoric against its regional archrival Iran.

In his speech, he suggested he feared for his life and said the climate 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 U.N.-backed tribunal in The Hague, Netherlands. Hezbollah denies any involvement.

Hezbollah has sent thousands of its fighters to Syria to shore up President Bashar Assad's government. The group's intervention in Syria is highly controversial in Lebanon.

Hariri said Hezbollah's policies have put Lebanon "in the eye of the storm." His attacks on Hezbollah come on the heels of new U.S. sanctions on the group that many fear will impact negatively on the Lebanese economy.

"Hezbollah was able in past decades to impose a reality in Lebanon by force of arms 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, end political division and establish the principle of self-sufficiency, but I have been unable to do so. Despite my efforts, Iran continues to abuse Lebanon," he said.

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 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's coming 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."