“There is a feeling of euphoria and celebration among most of the people,” Bays said. “There is a really high sense of expectation for this new president.
Of those voting in Lebanon’s 127-member parlaiment, 118 voted in favour of Sleiman becoming president.
Six of the ballots cast were blank, signifying a protest vote or reservations over Sleiman’s election.
Addressing the Lebanese parliament after the election, Al Thani said that Sleiman’s election was part of a process towards a lasting peace in Lebanon.
“The Lebanese [leadership], with its variety and diversity, acknowledged that there is no alternative but to reach an entente that will safeguard Lebanon’s security and interests,” he said.
“All Arab nations will feel reassured that the dearest countires will be able to embark on a new era based on freedom.
“Lebanon is the victor, Lebanon’s crisis is the vanquished.”
Rula Amin, Al Jazeera’s correspondent in Beirut, said many Lebanese intellectuals said they would have preferred a civilian candidate, but many other observers believe the selection of Sleiman was crucial in order to end the country’s political crisis.
She said: “It seems that for now both parties, both alliances have come to an agreement.
“The question on many people’s mind is that is this a final settlement or just a truce?
“There are still many issues that need to be resolved. For this moment in Lebanon‘s history he is the best, fittest person to take the job.”
The foreign ministers of Syria and Iran, which back Hezbollah, and European leaders were among the 200 dignitaries attending the parliamentary session.
Sleiman’s election is part of a deal brokered on Wednesday in Doha, Qatar’s capital, to end a political crisis that last month degenerated into violence.
Sixty-five people were killed when armed supporters of the Hezbollah-led opposition took control of much of Beirut after the government moved to outlaw the group’s private communications network.
The clashes were the worst internal violence in Lebanon since the country’s 1975-1990 civil war.
The Doha accord allows the opposition to have veto power on key policy decisions in a new cabinet of national unity.
Who’s who in Lebanese politics
Q&A: Political crisis in Lebanon
But while it brought the country back from the brink of civil war, it failed to address many key issues, including Hezbollah’s weapons stockpile.
Fouad Siniora, Lebanon’s prime minister, said in an interview with the AFP news agency that he felt the deal was fair, especially in light of the latest violence that shook the country.
“We all gave in [for the sake of] the country and at the same time we got something in return for the country,” he said.
“One has to look at the Doha accord as a package. It is a recognition by everybody who signed … this agreement that weapons are in no way to be used against the Lebanese for political reasons.”
Elias Hanna, a former chief of the Lebanese army, told Al Jazeera that Sleiman was a wise choice for the presidency.
“I think Sleiman came as a solution for this country, that’s why we have this consensus,” he said.
“There is a lot of criticism of the army and I do agree that there were a lot of deficiencies in the army. But [Sleiman’s election] is a solution for Lebanon.”
Earlier this week, Sleiman told Lebanese media that it would be impossible to “save the country on my own”.
“This mission requires the efforts of all. Security is not achieved by force but joint political will.”
The presidency has been vacant since November, when Emile Lahoud stepped down at the end of his term with no elected successor because of political disputes.
Nineteen previous parliamentary sessions to formally elect a new president failed due to boycotts by the opposition.
Though many see Sleiman as pro-Syrian in outlook, in nearly 10 years as head of Lebanon’s armed forces, he has managed to avoid taking sides.
As the new head of state, he will need to show he is a neutral figure if he is to reconcile the interests of the Western-backed parliamentary majority and the opposition.