BEIRUT (Reuters) - Fighting between Islamic State and the al Qaeda-linked Nusra Front spread from Syria into Lebanon’s northern Bekaa Valley region on Monday, killing combatants on both sides, a security source and the state news agency said.

Eighteen Nusra Front members were killed and six were taken prisoner during the clashes, and 14 Islamic State members were also killed, the security source said. Islamic State said in an online statement that it killed 17 members of Nusra Front.

The fighting began on Sunday near the Syrian town of Jrajeer in the Qalamoun mountains near the Syrian-Lebanese border, before spreading towards the Lebanese towns of Ras Baalbek and Arsal, the source said.

Lebanon’s National News Agency reported that Nusra Front had fought on Sunday to regain some positions it lost to Islamic State. In the fighting it said 10 Nusra Front fighters and eight Islamic State militants had died.

The border is not clearly demarcated in the mountainous region and fighting often spills over into Lebanon.

Nusra Front, loyal to the successors of Osama bin Laden, and Islamic State are the two most powerful forces fighting government forces in Syria. The groups have also fought each other since a split in 2013, prompted largely by a power struggle between leaders.

Nusra Front and Islamic State fighters have staged regular incursions into Arsal from the barren hills just outside. They overran the town briefly in 2014 before withdrawing to the hills after clashes with the army.

However, security sources say both groups continue to have a strong presence in the town, where thousands of Syrian refugees live in dire conditions.