Saudi Arabia started to reduce its long-term support for Hariri when Crown Prince Mohammed bin Salman summoned him to Riyadh last November and ordered him to resign, after complaining Hariri had not done enough to confront Hezbollah.
Hezbollah, along with affiliated groups and individuals, secured at least 67 seats, according to a Reuters calculation based on preliminary results for almost all the seats obtained from politicians and campaigns and reported in Lebanese media.
"We hope that all Lebanese political stakeholders will continue to act responsibly in the days following polling to protect Lebanon's stability, which should include the swift formation of a government", said United Nations spokesman Stephane Dujarric.
In a speech on Sunday's parliamentary elections, Hariri said that his Future Movement faced several challenges but considered his party's performance as an election victory.
The results will dismay not only Saudi Arabia.
The election is being held under a new proportional system that has confused some voters and made the contest unpredictable in formerly safe seats But it still preserves a sectarian power-sharing system and another coalition government including most of the major parties, like the one that has governed since 2016, looks likely, analysts say.
The group, whose arsenal outguns the army's does not derive its dominant status on the Lebanese scene from the ballot box but the new breakdown of parliament will increase its political legitimacy.
A woman shows her ink-stained finger after casting her vote during the parliamentary election in Beirut, Lebanon, May 6, 2018. In other polling stations, the counting was already under way.
"We hope we will open a new era", said Mahmoud Daouk, voting in Beirut.
Federation Internationale de Football Association proposes staging new mini-World Cup every 2 years
With the arrival of this summer's World Cup tournament in Russia, Electronic Arts is veering from one of its soccer game mainstay. Single Player and Online Tournaments will support all the World Cup mode additions, as will the Single Player and Online Drafts.
Hezbollah's allies include the Shi'ite Amal Movement led by Nabih Berri, the Christian Free Patriotic Movement established by President Michel Aoun and other groups and individuals that view its weapons as an asset to Lebanon. That, along with the new electoral law, injected some unpredictability to the process.
Of the 3.8 million registered voters, 49.2 percent cast their ballots in Sunday's poll, the interior ministry said, down from 54 percent in the last election in 2009.
"This means that I voted, and I'm happy that I voted and took part in change", said Guy Farah, a 36-year-old salesman showing the ink stain on his thumb as he walked out of a Beirut polling station.
Speaking on the eve of Sunday's election, Paul Salem of the Middle East Institute, a Washington-based research institution, predicted that "just a handful of new lawmakers from civil society" would be elected to the 128-seat parliament.
As a result, Hariri's team only got five out of 11 seats in Beirut, with four going to Hezbollah allies, one to the Social Progressive Party of Druze leader Walid Jumblatt, and one to a notable newcomer, independent Beiruti millionaire Fouad Makhzoumi. Nevertheless, Hariri is still expected to be asked to form the new unity government.
Hezbollah's seat gain may complicate relations with Western countries.
In a televised address a day after Lebanon's first elections in nine years, Sayyed Hassan Nasrallah said "the parliamentary presence" created by Hezbollah and its allies would guarantee the protection of the "resistance".
A member of the Israeli government said that the preliminary results confirmed the Israeli government's perception; that Lebanon and Hezbollah were equals.
Hezbollah, which was created in the 1980s to fight against Israel and now battles in Syria alongside regime forces, is listed as a terror organisation by the United States.