By Jim Muir
BBC News, Beirut
Voting passed off without serious violence, despite political tensions
Lebanon's political factions, on both sides, are struggling to digest the implications of an election outcome that took most by surprise.
As one Beirut newspaper put it, the outcome matched the highest hopes of optimists among the western-backed coalition, and the blackest fears of pessimists among the opposition, which is spearheaded by Hezbollah and backed by Syria and Iran.
Almost universal predictions, including those of many political insiders, put the two sides so close that the result would be decided by a tiny handful of seats, with a high chance of a hung parliament.
In the event, the opposition garnered a mere 57 seats, with the "loyalists" as they are known locally, winning 68, and associated independents a further three.
In the context, it was a significant victory - although oddly enough, given that the constituency basis was radically different from the last elections, the vote produced a chamber very similar in composition to the one that emerged from the 2005 polls.
The other surprise was that despite acute political tensions and memories of last year's bloody street battles, the voting passed off without serious violence.
Equally impressively, all parties appeared ready to accept the results, even those on the losing side.
Hezbollah's TV station, al-Manar, carried Saad al-Hariri's victory speech live in the middle of the night, and conceded in a news bulletin immediately afterwards that the loyalists had won a majority - long before the results were officially confirmed.
One of Hezbollah's main allies, Nabih Berri, who is Speaker of the outgoing parliament and heads the mainstream Shia movement Amal, said he fully accepted the results and congratulated the winners.
In his speech at 0200 local time, Saad al-Hariri - the Sunni leader who heads the biggest faction in the 14 March loyalist coalition - appeared low-key and gracious, with little sign of triumphalism.
He said he extended his hand to the other side to work together for the sake of Lebanon.
There were no winners or losers, he added: the only victors were democracy, and Lebanon.
So far, so good.
But it remains to be seen how long all this sweetness and light will survive the harsh political realities that lie immediately ahead.
In many ways, the results took the country back to square one, changing few of the elements that have deadlocked the political process for several years.
As the Lebanese daily al-Safir put it: "After four years of open-ended national crisis, the elections have reproduced the [outgoing] parliament of civil division."
There could be drawn-out haggling over the post of prime minister
The first challenge after the electoral dust has settled will be to produce a government capable of functioning.
Even in tranquil times, assembling a Lebanese cabinet is a convoluted and delicate process, because of the need to balance both sectarian and political elements.
It will be even more difficult in the current charged political climate.
One key issue bound to raise its head straight away is whether or not the opposition should be granted "veto power" by being given one-third of the seats in the new government.
Under the Doha agreement that resolved the crisis in May 2008, Hezbollah and its allies won that concession.
But leaders of the majority coalition, while advocating an all-embracing National Unity government, have said they don't want the opposition to have veto power, asserting that it leads to paralysis.
Test of strength
The struggle over the "blocking third" will be an early test of political strength and determination.
There may even be lengthy haggling over who will be the next prime minister - a post reserved for Sunnis under the country's confessional system.
Saad al-Hariri himself is believed to be keen to have the job.
When it looked as though the two sides would emerge from the elections more or less equal, a compromise candidate - northern businessman Najib Miqati - was mentioned as a possible premier.
But the loyalist victory might put paid to that thought.
Another contender could still be the outgoing incumbent, Fuad Siniora, who is close to Mr Hariri and has just legitimised his political existence by being elected a deputy for his home city of Sidon.
Given all those issues, assembling a new government could take weeks, even months.
And once it is in place, there is no guarantee that it will be any less dysfunctional than the outgoing administration.
"Nothing will change, no matter what - we'll eventually have another government of national disunity, and things will stay the same for the next half-century," one Lebanese observer remarked drily.
One issue over which it would clearly be deadlocked from the outset would be the thorny one of Hezbollah's military might, which makes it stronger even than the Lebanese army.
The 14 March loyalists would like to see Hezbollah disarmed or merged with the army - something the militant movement says is a red line as long as Israel remains a threat.
But the picture may not remain as static as might be thought.
In the run-up to the election, there were some signs that the two monolithic blocs might start to unravel amidst changing times.
One of the key figures in the 14 March coalition, the Druze leader Walid Jumblatt, appears willing to mend fences with Amal chief Nabih Berri, an old ally from civil war days.
There has also been a public flirtation between Mr Jumblatt and the Hezbollah leader Hassan Nasrallah.
He praised Mr Jumblatt's reaction to the recent report in Der Spiegel which said that the International Tribunal set up to investigate the murder of Mr Hariri's father, the former Prime Minist4er Rafiq al-Hariri, was concluding that Hezbollah was involved.
Walid Jumblatt, left, and Saad al-Hariri have both lost their fathers
Mr Jumblatt's own father Kamal was murdered in 1977. Both he and Mr Hariri have publicly accused Syria of being behind the deaths of their fathers.
But Mr Jumblatt recently told the BBC that he would not rule out reconciliation with Damascus, if such a step were advocated by Saudi Arabia.
The detente between Syria and Saudi Arabia is seen as one of the factors conditioning the peaceful conduct of Lebanon's elections, given the huge influence both countries wield here.
If that detente is sustained, reconciliation between Damascus and its fiercest Lebanese critics would be a natural thing to follow.
Through most of the 1975-1990 civil war, Mr Jumblatt was one of Syria's most dependable allies in Lebanon.
The confrontational style of President George W Bush's administration encouraged Mr Jumblatt and others to adopt stridently anti-Syrian positions, hoping that Damascus might be next on Washington's list for regime change.
But those days have passed.
Washington under President Barack Obama is itself courting Damascus, and trying to open lines to the Islamic regime in Tehran.
Given Syria's undoubted power and influence on the local scene, that might make reconciliation with Damascus an attractive course for Lebanon's currently anti-Syrian leaders.
It would not be an unprecedented move.
Panoply and fanfare
The Christian leader, former General Michel Aoun, famously defied and fought the Syrians in the late 1980s, and was ousted by them.
Now he is allied to Syria's Lebanese allies Hezbollah and Amal, and recently visited Damascus with much panoply and fanfare.
If such reconciliations took place, accompanied by realignments on the Lebanese stage, it would end the basic polarisation, between the pro-western camp and that backed by Syria and Iran, that has afflicted the country's politics in recent years.
"There has to be a settlement after the elections, otherwise we really will be stepping into the unknown," Mr Jumblatt told the BBC.
"But it's a minefield," he added.
For the moment, Lebanese politicians will be embroiled in the tricky and heated business of trying to fashion a government.
In a broader perspective the country is now on hold, awaiting as ever the outcome of bigger moves on the international and regional stages which have always had immediate resonance here.
If President Barack Obama's overtures to Damascus and even Tehran bear fruit, and - an even bigger if - his concerted effort to promote Middle East peace should pay off, Lebanon would be quite a different place than it is today.
For the meantime, Washington will undoubtedly be relieved that it did not have to face the dilemma of how to deal with an apparent victory by Hezbollah and its allies.
To what extent the success of the 14 March loyalists constitutes a real defeat for Hezbollah itself is an open question.
Some observers believe the movement was not seriously set on winning the election and dominating a new government.
Hezbollah itself fielded a mere 11 candidates for the 128-seat parliament, and they all won seats.
The local implications of the setback might be greater for its Christian allies under Michel Aoun, who did considerably less well than they had hoped.