At least seven militants were detained in a raid after security forces received a tipoff that the militant group was holding a number of foreign workers whom it had hoped to exchange for ransom, Ramadan al-Haddad told The Anadolu Agency.
During the raid, al-Haddad said, security forces had managed to secure the release of 47 workers from Sudan, Ghana, Egypt and Senegal, the official said.
Libya has remained in a state of turmoil since a bloody uprising in 2011 ended the decades-long rule of autocratic leader Muammar Gaddafi.
In the more than three years since, the country's sharp political divisions have yielded two rival seats of government, each of which has its own institutions.
Vying for legislative authority are the internationally-backed House of Representatives, which convenes in the eastern city of Tobruk, and the Islamist-led General National Congress (GNC), which – even though its mandate has ended – continues to convene in Tripoli.
Last week, a video emerged showing the execution of 21 Egyptian Coptic Christian workers in Libya by masked men purportedly belonging to ISIL militant group.
In retaliation, Egyptian warplanes struck suspected ISIL targets in Libya's eastern city of Darnah.