Authorities have confirmed that French troops are fighting Islamist militia alongside government forces in Libya. The announcement comes after three French soldiers were killed during an intelligence-gathering mission in the North African country.

“At this moment we are carrying out dangerous intelligence operations [in Libya]. Three of our soldiers, who were involved in these operations, have been killed in a helicopter accident,” French President Francois Hollande said in a speech, as reported by Reuters.

France had previously acknowledged its warplanes were executing reconnaissance flights over Libya, but never admitted to deploying Special Forces personnel.

It is understood, that French military advisers and Special Forces have been helping Libyan troops fight Islamist militia in the eastern Libyan city of Benghazi starting this spring, in cooperation with the UK and the United States. They have also been training Libyan soldiers.

The French defense minister on Wednesday deplored the deaths of the French troops, praising the “bravery and devotion of French military personnel who each day are carrying out dangerous missions against terrorists” in an official statement.

The news was first broken by AP news agency, which claimed that two French soldiers had died. Citing officials in Libya, the agency reported that Islamist militia downed a helicopter outside Benghazi, killing the Special Forces soldiers who were on board.

The aircraft belonged to Dignity Operation forces operating under Libyan General Khalifa Haftar, the head of armed forces based in Libya’s east.

The officials, reportedly an air force officer who knew the helicopters’ passengers and an employee of the Western missions in Libya, spoke on condition of anonymity. They claimed there were no survivors in the attack.

Islamists from the ‘Defending Benghazi Brigade’ militia, in opposition to Haftar, claimed the attack, specifying they had used an SA-7 shoulder-fired missile and heavy machine guns to bring down the aircraft. The downing came as clashes intensified between Haftar’s forces and Islamists, who advanced greatly in western Benghazi within the past few days, Libyan Express reports.

Libya turned into a battleground of competing groups which sought power after former Libyan leader Muammar Gaddafi was toppled in 2011. At that time, France took a leading role in the NATO-led airstrikes against Libya, aimed at helping rebels oust Gaddafi. The power and security void that followed brought along the resurgence of militias and terror groups, like Islamic State (IS, formerly ISIS/ISIL) and Al-Qaeda affiliates.

In December 2015, a UN-brokered Government of National Accord and a presidency council were created in an attempt to return stability and peace to Libya amid the unending civil war. Led by Prime Minister Fayez Sarraj, it is considered the only legitimate power by the UN Security Council. Still there are a number of rival factions that oppose Sarraj’s government, each backed by different militias and tribes. These factions have been holding meetings in neighboring Tunisia over the weekend to seek ways to overcome the divide.