The rebel Libyan National Army (LNA) has released a Turkish cargoship seized on 5 December after allegedly straying into a no-sail zone.
A fine was imposed on the 8,500-dwt Mabrooka (built 2005).
The Jamaica-flagged vessel had been intercepted by LNA forces and towed to the port of Ras al-Hilal.
The LNA had said the ship was being investigated for violations of maritime laws and regulations, but confirmed its release on Thursday after the paying of an undisclosed fee.
The vessel has continued on to Misrata in Libya with a cargo of medicines, Turkey said.
Turkey is the main foreign backer of the internationally recognised Government of National Accord (GNA) in the west, which has been fighting the eastern-based LNA for years.
Turkey had condemned the detention.
"Targeting Turkish interests in Libya will have grave consequences, and these elements will be viewed as legitimate targets," the Turkish foreign ministry said.
LNA sources claimed the Mabrooka had been spotted 4.4 nautical miles (8 km) north of Ras al-Hilal.
This was within Libyan territorial waters and the LNA's Derna no-sail zone.
In a statement, LNA spokesman Ahmed al Mismari said the vessel had not responded to hails over radio and was operating within an area restricted for military operations.
The crew was reported to consist of nine Turks, seven Indians and an Azerbaijani national.
This was the sixth LNA seizure in the no-sail zone documented by security consultancy Ambrey in 2020 and the second involving a Turkish-owned vessel.