In a brief, surprise visit to Lebanon on Wednesday, Secretary of State John Kerry said the U.S. will give more than $290 million to United Nations agencies working with Syrian refugees, and earmark $51 million of that sum to Lebanon specifically. He added that he thinks its about time the country replace outgoing president Michel Suleiman, who left office on May 25, a task that is actually much more difficult than it seems.

After meeting with Prime Minister Tammam Salam, Kerry said that the "stalemate here in Lebanon is deeply troubling." He continued, "Lebanon needs and Lebanon deserves to have a fully empowered, fully functioning, complete government. We hope the Lebanese parliament will select a president quickly." 

This isn't the first time that Lebanon has gone without a leader: the country was sans president for months in 1988 and in 2007. Adding salt to Lebanon's no-president wounds is the fact that over the weekend, thousands of Syrian expatriates gathered to vote in Beirut — for Bashar al-Assad: 

So why is it so hard for Lebanon to elect a new president? There are a few reasons, most of them related to the civil war in neighboring Syria. In brief, here's what behind Lebanon's political morass. 

First, let's review how Lebanese elections work. The Lebanese public elects 128 representatives to Parliament, who then vote amongst themselves to pick a new president. Members of parliament are selected every four years, and the president — who can only serve for one term — every six. 

The members of parliament can vote for a new president up to two months before the previous term is up, and must vote for a new one in a session ten days before his last day in office. The current parliament has indeed attempted to meet to vote on a president a number of times (five altogether), but have not been able to reach the two-thirds quorum required to make a move. The Associated Press reports

Thursday's election could not take place because lawmakers allied with the Shiite militant group Hezbollah boycotted the meeting... Hezbollah has maintained their attendance is pointless without agreement on a consensus candidate.

The parliamentary election is itself complicated by a voting process that is byproduct of a decades old power-sharing agreement that mandates that the parliament be strictly divided according to religious affiliation. Basically, each religious sect gets a designated number of parliamentary seats, yet each member must still win a majority of votes to be instated. 

What's more the system calls for specific offices to be set aside for specific religious affiliations: The country must have a Maronite Christian president, a Sunni Muslim Prime Minister, and a Shia Muslim Chairman of the National Assembly. The president held more power than the others until the 1989 Taif Agreement, which evened out the the political field. 

Fox News explains that implications of that shift for the presidency:

The Christian president retains powers such as making recommendations for top military posts and the signing of international treaties, but he needs the prime minister’s cabinet approval. A Shiite always holds the position of speaker of parliament. This power-sharing arrangement, based on demographics in 1989, forced the Christians, who had historically been in charge of appointing the country’s prime minister, to accept that they had lost their majority to the Muslims.

Today, many of the country's Maronite Christians have allied themselves with Hezbollah, which has in turn aligned itself with Syrian President Bashar al-Assad. Middle East expert Mohamad Bazzi explained to Fox that "the Lebanese Christians are also watching the fate of fellow Christians in Syria, the violence against them from Sunni jihadists,” and that they fear for their own futures if Syrian violence spilled into the region. 

Together, Hezbollah and its Christian supporters have enough of contingency in parliament to be able to make demands of the group by boycotting sessions, but not by outvoting their opponents. Again, Fox News: 

This consolidation of power potentially gives them the ability to overthrow the government. Lebanon has already lost core components of statehood to Hezbollah, which brazenly follows its own military and foreign policy.

Hezbollah says it wants a "consensus candidate," but its opponents say it won't settle for anyone less than their representative, Gen. Michel Aoun of the Free Patriotic Movement. In an interview with the Daily Star, Aoun's main political opponent Samir Geagea, leader of Lebanese Forces and vocal critic of Hezbollah, said the leader is holding Lebanon's electoral system hostage: 

On the presidency, cooperation stopped from the first moment because the Free Patriotic Movement came with one proposal – either we support General Aoun or they are not ready to discuss any other option.... They are of course not ready to support me and I don’t find that strange. But beyond that they are not ready for any proposal – either we support General Aoun or nothing else.

Which is exactly what it seems to be doing.