ISIS terrorists
ISIS terroristsReuters

A Libyan court on Monday sentenced 17 former members of the Islamic State (ISIS) group to death, The Associated Press reported, citing the country's Tripoli-based top prosecutor.

The death sentences were given out to those convicted of participating in the killing of 53 people in the western city of Sabratha and destruction of public property, according to the statement.

Another 16 militants were given prison sentences, two of them for life. The court did not specify when the sentences would be carried out.

Libya has been rocked by chaos since the 2011 uprising that toppled and killed dictator Muammar Qaddafi, with two rival authorities and multiple militias vying for control of the oil-rich country.

As a result, the country has become a haven for jihadists and has experienced multiple terrorist attacks in recent years.

ISIS took advantage of the chaos to gain a foothold in the coastal city of Sirte in 2015.

Forces loyal to the UN-backed Government of National Accord (GNA) regained control of Sirte in December 2016 after eight months of deadly fighting.

Since then, some jihadists have returned to the desert in an attempt to regroup and reorganize.

In April 2016, near the height of its power, the Libyan branch of ISIS had recruited around 6,000 fighters, according to US military experts.