More than 80 ISIL fighters have been killed in United States air raids on camps operated by the armed group inside Libya, according to US officials.

The Pentagon said on Thursday that B-2 bombers and US drones had targeted overnight two camps southwest of the city of Sirte, a former bastion of ISIL in the North African country.

Ash Carter, the US defense secretary, said on Thursday that some of the ISIL fighters were believed to be actively planning attacks against targets in Europe, without offering any details.

"We need to strike ISIL everywhere they show up," Carter said on his last day office.

"And that's particularly true in view of the fact that we know some of the ISIL operatives in Libya were involved with plotting attacks."

Earlier on Thursday, Peter Cook, the Pentagon's press secretary, said the attacks were authorised by outgoing US president Barack Obama and were in conjunction with Libya's United Nations-backed government of national accord.

Post-Gaddafi chaos

Last month, forces aligned with Libya's internationally recognised government took full control of Sirte from ISIL, which stands for Islamic State of Iraq and the Levant.

Sirte fell after a sustained offensive starting in May 2016, including US air strikes targeting tanks and other vehicles used by ISIL, also known as ISIS.

Inside Story: Can US air strikes push ISIL out of Libya?

ISIL had seized control of Sirte, the hometown of Libya's former leader Muammar Gaddafi, in 2015.

The group took advantage of conflict between various factions of former rebels who emerged as powerbrokers after Gaddafi was killed in 2011.