Spokesman Ayoub Gassim said a wooden boat carrying at least 22 African migrants, all men, was intercepted Friday north of the Bouri offshore oil field, around 105 kilometers (65 miles) from Tripoli.
He said the migrants were given humanitarian and medical aid and then were taken to a refugee camp in the Tajoura district of eastern Tripoli.
Libya became a major conduit for African migrants and refugees fleeing to Europe after the 2011 uprising that ousted and killed longtime ruler Moammar Gadhafi.
Libyan authorities have stepped up efforts to stem the flow of migrants, with European assistance.