Libya's U.N.-backed unity government has said that France did not coordinate with it over the presence of French troops in Libya and that it would not compromise on its sovereignty after France announced the deaths of three of its soldiers there.

Special forces teams from countries including France, Britain and the United States are on the ground in western and eastern Libya to fight Islamist militants.

The French have been working alongside forces loyal to eastern Libyan commander Khalifa Haftar who have been battling Islamist militants and other opponents in Benghazi and elsewhere in the east. But Haftar has rejected the U.N.-backed Government of National Accord (GNA) in Tripoli, which is backed by major Western powers — including France.

The GNA's Presidential Council said in a statement released late Wednesday that it had asked France for an explanation after President Francois Hollande announced the soldiers' deaths during "dangerous intelligence operations."

"The Presidential Council expresses its deep discontent at the French presence in eastern Libya without coordination with the Council, which was declared by the government of France," said the statement from the unity government.

There could be "no compromise" over Libyan sovereignty, the council said in the statement.

Hollande called the helicopter crash an accident, but Benghazi Defense Brigades (BDB), an Islamist-leaning armed group fighting against forces loyal to Haftar, claimed it had shot the helicopter down. A military spokesman from Haftar's forces in eastern Libya said the French had died when their helicopter came down Sunday south of Benghazi.

The GNA is meant to replace two competing governments that were set up in Tripoli and the east in 2014, both backed by rival alliances of armed groups. But the GNA has acted cautiously and has so far failed to win formal endorsement from the east.

News of the French deaths brought divisions to the surface, with demonstrations against the French presence Wednesday in the western city of Misrata and in Tripoli. Some of the demonstrators were people displaced from Benghazi by Haftar's campaign.

Libya's Grand Mufti Sadiq Ghoryani, a senior cleric who commands some respect in western Libya and has openly backed the BDB, described the French presence as an "invasion," which he called on all Libyans to resist.

Western powers are hoping the GNA can end the turmoil and conflict that developed after Libyan leader Muammar Gaddafi was toppled in an uprising five years ago.

They have said they are ready to help Libya tackle the threat from Islamic State, but the GNA says any assistance must follow its own request.