The migrants, including women and children, were from Mali, Gambia, Sudan, Nigeria, and other nationalities, he added.
Libya is home to nearly 600,000 migrants, according to U.N. figures. Most are from sub-Saharan Africa, some attracted by the prospect of work in the oil-rich country despite years of conflict and chaos, while others see it as a jumping-off point for travel on to Europe.
Over the past weeks, authorities in Tripoli have arrested thousands of them and held them in detention centers in a crackdown that has resulted in several deaths.
Libya's Government of National Unity has said it is "dealing with a complex issue in the illegal migration file, as it represents a human tragedy in addition to the social, political and legal consequences locally and internationally."