A briefing to cabinet yesterday said "18 Sudanese nationals were killed in one incident due to fall of a random rocket on the area of their residence on the outskirts of Tripoli", the state SUNA news agency said yesterday, quoting cabinet spokesman Omer Mohammed Salih.
SUNA did not say when the deaths occurred.
Since mid-July, Libya has seen clashes between rival militias in Tripoli, where fighting broke out again on Monday, and in the eastern city of Benghazi.
Tripoli airport has been closed since gunmen, mostly Islamists, attacked it on July 13 in a bid to wrest control from the Zintan brigade of former rebels who have held it since 2011.
More From This Section
The foreigners' exodus gathered pace at the weekend when Britain and Greece sent ships to evacuate nationals.
On Tuesday, the Philippines said it would send a ship to pick up at least 700 of its citizens trapped in Libya.
Sudan's Foreign Minister Ali Karti said that although Sudanese have been killed, "the situation in Libya did not yet reach the critical stage that necessitates evacuation of the Sudanese there", SUNA reported on Monday.
Libya has been a popular destination for Sudanese migrant workers seeking better opportunities outside their impoverished nation.