BEIRUT (Reuters) - The Lebanese army and Islamist militants clashed on Wednesday despite a 24-hour ceasefire agreed to end five days of fighting that has killed dozens of people in the most serious spillover of Syria’s three-year civil war into Lebanon.

Lebanese army soldiers sit atop of an armoured carrier at the entrance of the Sunni Muslim border town of Arsal, in eastern Bekaa Valley August 5, 2014. REUTERS/Hassan Abdallah

Saudi Arabian King Abdullah granted $1 billion to help the Lebanese army to bolster security as they battle militants who have seized the border town of Arsal on the Syrian frontier, state news agency SPA reported.

Machine gun fire and shelling broke out on Wednesday morning on the outskirts of the town in breach of the 24-hour ceasefire, which came into force at 7 p.m. (12 p.m. EDT) on Tuesday.

“The ceasefire is continuing, but we are responding to any violations,” a security official said.

At least 17 soldiers have been killed and 22 are missing from the violence in and around Arsal. Preliminary reports from inside the town suggest dozens of people have been killed there.

Advancing Lebanese troops found the bodies of 50 gunmen on Monday, security sources said, while sources in the town report heavy casualties among its civilian population.

Arsal’s mayor Ali Hujeiri, by phone, said the gunmen were on the outskirts of the town. “There was a ceasefire, but it is not being implemented,” he said, adding that there appeared to be more militants in the area.

“The army is still there, the gunmen are still there, and the ones suffering are the civilians.”

Arsal was the first stop for many civilians fleeing the bloodshed in Syria. Refugee camps in Arsal that provide shelter to tens of thousands of Syrians who fled the war have been badly damaged in the fighting, forcing them to seek shelter in the town itself, Syrian activists in the area have said.

This was the first major incursion into Lebanon by hardline Sunni militants - leading players in Sunni-Shi’ite violence unfolding across the Levant - which threatens the stability of Lebanon by inflaming its own sectarian tensions. (Full Story)

While Lebanon has officially tried to distance itself from Syria’s conflict, the country’s powerful Shi’ite movement, Hezbollah, has sent fighters to aid President Bashar al-Assad, an Alawite. Assad, like Hezbollah, is backed by Shi’ite power Iran.

The clashes in Arsal began on Saturday after security forces arrested an Islamist commander popular with local rebels who often move across the porous border with Syria.

Soon after the arrest, gunmen attacked local security forces and seized the town.

SAUDI MONEY

Saudi news agency SPA said the aid was announced by former Lebanese Prime Minister Saad al-Hariri, who has close links to the Saudi royal family, after a visit to King Abdullah in his summer residence in the Red Sea city of Jeddah on Tuesday evening.

The king “has issued an order to provide aid to the Lebanese army and the national security (forces) to the value of one billion dollars to support their ability to maintain the security and stability of Saudi Arabia’s sister country, Lebanon”, said Hariri, cited by SPA.

The militants have been identified by officials as members of the Nusra Front, al Qaeda’s branch in Syria, and of the Islamic State, which has seized large areas of Iraq and Syria.

Lebanon - a country of about 4 million, bordering Israel - has avoided the kind of war afflicting Syria and Iraq, but regional conflicts have rekindled decades-old tensions.

Rocket fire, suicide attacks and gun battles connected to Syria’s war have plagued Lebanon and the conflict has worsened Lebanon’s perennial political deadlock, with officials divided largely along sectarian lines.

More than 170,000 people have been killed in Syria’s war, which started in 2011 as a peaceful protest movement, then degenerated into civil war after a government crackdown.