Libyan officials say the body of a judge abducted last month by an Islamic State affiliate has been found.

Lawmaker Saad Abusharrada says Judge Mohamed al-Nemli's body was found on Thursday near the western coastal city of Misrata. He says the body had signs of torture and a gunshot wound.

Residents have said that al-Nemli was taken hostage along Libya's east-to-west coastal road where IS fighters man checkpoints. The residents spoke on condition of anonymity, fearing reprisals.

The municipality of the town of Zliten, where al-Nemli worked, confirmed his death.

Libya has descended into chaos following the 2011 civil war that ended dictator Moammar Gadhafi's rule, with parts of the country run by Islamic militants. A militant faction declared its allegiance to the Islamic State group last year.