It was mid-November, the day of the fatal and bloody attack on worshipers at a synagogue in Jerusalem. And annoyingly for a journalist, I found myself far removed – sitting down for dinner at a home in southern Beirut.

Around the table was a senior commander from Hezbollah, and the former leader of the Shiite Amal militia. 'It was an excellent attack, very well done', the two men agreed. They were happy with the horrifying news from Jerusalem – a brutal attack against their enemy.

Lebanese villagers ready to fight. (Photo by the author.)

This encounter took place in Dahiye, a suburb of southern Beirut long considered the heartland of support for the Shiite militia and political force, Hezbollah. I was in Lebanon to examine Hezbollah's controversial and crucial role in the war in Syria, and the effort to prevent the array of militant groups operating over the border from spreading their presence towards Beirut and Tripoli. The Hezbollah commander had just returned from Syria. He commands a unit there and had fought in many of the major battles in the war, including in Qusayr and Homs.

Most of his time, he said, was spent fighting the militants from Jabhat Al Nusra and Islamic State. Both groups have a heavy presence near the Lebanese border, particularly around the Qalamoun region.

'Jabhat Al Nusra and IS are two sides of the same coin', he said. 'They are one. In Qalamoun they are fighting together, they have one boss. In Syria they might have two bosses, but in Qalamoun they are one. They have high-tech weapons, high-tech training, they are good fighters'.

Three recent attacks have demonstrated just how seriously these groups are threatening Lebanon's borders.

The first was in the Sunni Lebanese border town of Arsal in August. Militants overran the place and captured more than 30 Lebanese soldiers and police. Most of them are still in captivity. Four have been killed. The second happened further south in the Bekaa Valley when IS and Nusra fighters encroached on the town of Brital. Again they were forced back. Then, on 2 December there was a third attack — gunmen ambushed a Lebanese Army patrol near the border at Ras-Baalbek, killing six soldiers. This incident happened on the same day that a wife of the Islamic State leader was reportedly arrested in the area by Lebanese authorities.

Over dinner, our Hezbollah commander was careful to stick to the propaganda sheet, especially on the chances of Islamic State extending its control into Lebanon. 'As long as there is the Army, and the people and Hezbollah, there will be no problem', he said.

Throughout the Bekaa Valley, ordinary Lebanese are arming themselves and preparing to fight. Villagers clutching AK-47s have already rushed out more than once to try to repel attacks from IS and Nusra militants. When asked, they eagerly display their amateur arsenals and vow to send the Sunni militants back to Syria.

In truth, the threat to Lebanon goes further than simply the Bekaa Valley and the mountainous border with Syria. It also extends to the city of Tripoli. Eighty-five kilometres north of the capital, this predominantly Sunni Muslim city has seen repeated violence related to the war in Syria. Usually it involves Alawite supporters of Syrian President Bashar Al-Assad locked in clashes with Sunni opponents in the town. But the most recent fighting in Tripoli is a reflection of the growth in support for Islamist groups like the Islamic State. The tension erupted in October when the Lebanese Army launched a crackdown on the Sunni militants in the town, including IS supporters. 162 militants were arrested and 22 killed. At least 11 soldiers were also killed.

While the Tripoli violence is now in check, it came as another reminder of the looming Islamist threat to Lebanon. Shiite militias and political parties are using the unrest to bolster their support for Hezbollah's involvement in Syria (ie. 'these "Takfiris" must be stopped from entering Lebanon.')

At our dinner in Dahiye, we were joined by Hamza Akl Hamieh (pictured below), the former leader of the Shiite Amal militia. During Lebanon's civil war, he was involved in no fewer than half a dozen airline hijackings. His aim at the time was to win the release of the revered Shiite leader Musa Al-Sadr, who had gone missing in Libya and was presumed captured or murdered by Muammar Gaddafi.

These days, Hamieh is wanted in the West but widely respected in Lebanon. I spent a day with him traveling around the Bekaa Valley, where he grew up. He contends that support for Hezbollah's involvement in Syria is growing, a major change from the early days when many Lebanese disagreed with the concept of Hezbollah fighting other Muslims.

'Some people were opposed to joining the war in Syria, but now after the Arsal and Brital attacks, that is changing', he said. 'All Lebanese today have started to realise how serious the matter is of terrorists coming to Lebanon'.

But this is an extraordinary oversimplification. While Hezbollah's support may be strengthening, Lebanon's delicate sectarian mix remains hopelessly divided on the issue of the Syrian war. Sunni leaders view Shiite Hezbollah's involvement as the cause of the terrorism threat, not the solution. They want the organisation's masters in Tehran to abandon the fight.

'The most important grant that Iran could give to the Lebanese people and the Lebanese army is to ask Hezbollah to withdraw from Syria', said the Sunni former prime minister and Future Movement leader Saad Hariri from his self-imposed exile in Paris.

Without a president, Lebanon is in a state of suspense. The major sectarian and political groupings remain unable to agree on a candidate. But the political stalemate is the least of this nation's problems. Overwhelmed by more than a million refugees and a growing threat of Islamist militants on its territory, Lebanon's future looks as precarious as its past.