The Lebanese army said on Thursday that it had arrested eight militants, including a military deserter who joined the Islamic State group and four Syrians. The army said in a statement, announcing the arrest, that the men were taken into custody during a raid in the northern town of Akkar, the Associated Press (AP) reported.

The eight men had allegedly committed terror attacks and fought with military forces in Lebanon.

At least four Lebanese soldiers are believed to have deserted and joined militant groups. Of these, Abdul-Rahman Khaled, who was arrested in the latest raid, had declared his allegiance to ISIS last year, according to the AP.

In recent years, the war in Syria has spilled over the border into neighboring Lebanon, where foreign militants have carried out border attacks, abductions and killings. Some of the Sunni rebels in the area support the militant group, which announced plans to declare an Islamic emirate in Lebanon in February. Others from Lebanon’s Christian and Shia communities support the Syrian regime led by President Bashar Assad.

The growing need for self-defense has led to an alliance between Christian militias and the Iran-allied Shiite Hezbollah. Lebanon is one of the main sources of Shia fighters in Syria, who are believed to number up to 10,000 and are generally loyal to Assad. Their numbers have bolstered the beleaguered president’s position after mass defections from the Syrian army.