In this photo released by the Lebanese Parliament media office, former Lebanese Prime Minister and lawmaker Saad Hariri, center, casts his vote during a session to elect new president at the parliament hall, in Beirut, Lebanon, Monday, Oct. 31, 2016. Lebanon's parliament on Monday elected Michel Aoun, an 81-year-old former army commander and strong ally of the militant group Hezbollah, as the country's president, ending a more than two-year vacuum in the top post and a political crisis that brought state institutions perilously close to collapse. (Hassan Ibrahim, Lebanese Parliament media office, via AP)

In this photo released by the Lebanese Parliament media office, former Lebanese Prime Minister and lawmaker Saad Hariri, center, casts his vote during a session to elect new president at the parliament hall, in Beirut, Lebanon, Monday, Oct. 31, 2016. Lebanon's parliament on Monday elected Michel Aoun, an 81-year-old former army commander and strong ally of the militant group Hezbollah, as the country's president, ending a more than two-year vacuum in the top post and a political crisis that brought state institutions perilously close to collapse. (Hassan Ibrahim, Lebanese Parliament media office, via AP)

BEIRUT (AP) — Lebanon’s two major parliamentary blocs on Tuesday named Saad Hariri, a former prime minister and a Sunni leader, as their candidate for premier in the government being formed after a new president was elected.

The widely expected endorsement by the Future bloc, led by Hariri, and the majority Christian bloc comes a day after Michel Aoun was elected president.

Hariri was promised the post in exchange for backing Aoun’s presidential bid in parliament, ending a two-and-half-year deadlock that left Lebanon without a president.

Aoun is receiving the different parliamentary blocs Wednesday before naming the prime minister, likely before the weekend.

In the country’s sectarian-based political system, the prime minister, always a Sunni, is likely to face a daunting job, balancing different and often rival groups, to form a new Cabinet.

ADVERTISEMENT

Gebran Bassil, who heads the Free Patriotic Movement of Aoun, said they back Hariri’s nomination for the premier post.

“We accept whoever accepts us. All our votes will go to Hariri because he recognized us and we will side with him in all the difficulties he will face,” Bassil told reporters.

Lebanon has been without a head of state since May 2014. According to the power sharing system governing Lebanese politics since the 1990s, the president must be a Maronite Christian.

Parliament failed in 45 different sessions to vote for a president, amid political infighting and boycotts, before Monday’s election of Aoun.

Hariri’s about-face in support of Aoun last month broke the deadlock and changed the political landscape in Lebanon, bringing old-time foes on the same side, while allies differed.

Hariri, 46, served as prime minister briefly between late 2009 and 2011, when his government was brought down by powerful Lebanese Hezbollah group, now a major Aoun backer. He since left Lebanon, and was a vocal critic of Hezbollah. He returned earlier this year, sounding a more conciliatory tone.

Hariri is the son of late Prime Minister Rafik Hariri, who was assassinated in February 2005 with massive bomb on a Beirut seaside street.

The U.N. Security Council welcomed Aoun’s election as “a long-awaited and critical step to overcome Lebanon’s political and institutional crisis.” It urged the new president to promote the country’s stability and swiftly form a unity government and elect a parliament by May 2017, saying these steps “are critical for Lebanon’s stability and resilience to withstand regional challenges.”

U.S. State Department spokesman John Kirby told reporters in Washington that Secretary of State John Kerry called both Hariri and Aoun to congratulate them and express, “our desire to see now that the Lebanese people have a chief executive, to see that Lebanon can move forward.”

___

Associated Press writers Matthew Lee in Washington and Edith M. Lederer at the United Nations contributed to this report.