Libyan forces say they have regained control of the port in the city of Sirte from the Islamic State (IS) extremist group.
The government said two soldiers were killed and eight were wounded.
Sirte, the hometown of ousted ruler Muammar Qaddafi, is the most significant IS stronghold outside Iraq and Syria.
The Libyan forces, aligned to the UN-backed unity government in Tripoli, began the battle to retake the city last month.
Spokesmen said that the forces also recaptured a residential area in the east of Sirte and that many militants were under siege in the city center.