BEIRUT, Aug 14 (Reuters) - Lebanon on Thursday charged 43 Syrians, including an Islamist commander whose arrest sparked five days of fighting between Islamists and the Lebanese army, with belonging to armed terrorist groups and seeking to establish an Islamic emirate.

A judiciary source said 10 of those charged were in custody, among them 30-year-old Emad Gomaa, who had been a member of the Nusra Front, an al Qaeda affiliate fighting President Bashar al-Assad's forces in Syria, but recently switched allegiance to the ultra-hardline Islamic State.

His arrest this month prompted Islamist militants in the town of Arsal on the border with Syria to seize a police station and take more than 30 police and soldiers hostage.

The ensuing five-day battle with the army was one of the worst spillovers of Syria's civil war into Lebanon. Security sources say dozens of militants and 19 soldiers were killed.

The fighting ended when the insurgents accepted mediation by Lebanese Sunni clerics, after which they withdrew, taking 19 captured soldiers with them.

Rebel sources say the insurgents are demanding Gomaa's release as one of the conditions for releasing their hostages.

Lebanon's army chief told Reuters this week that Gomaa's confessions had led to the arrest of a number of militant cells in different parts of the country.

Lebanon is still dealing with the fallout of its own 1975-90 civil war, and has experienced a number of flare-ups of sectarian fighting within its borders fuelled by the war in Syria. (Reporting by Mariam Karouny; Editing by Kevin Liffey)