Six Turkish sailors detained by East Libya-based commander Khalifa Haftar's forces were freed on Monday, Foreign Ministry spokesperson Hami Aksoy said.
According to Aksoy, the sailors have decided on their own accord to continue working and have gone aboard a ship owned by a Libyan company.
The Turkish Foreign Ministry on Sunday warned Haftar forces that they would become legitimate military targets if they did not release the six Turkish citizens.
"Holding six Turkish citizens in Libya by illegal militia loyal to Haftar is an act of banditry, piracy," the Foreign Ministry said in a statement.
Turkish Vice President Fuat Oktay and ruling Justice and Development Party (AK Party) spokesperson Ömer Çelik warned Haftar forces on Monday morning to release the detained or pay a "heavy price."
Last week, Eastern Libyan forces loyal to strongman Haftar said the self-styled Libyan National Army (LNA) would attack any Turkish military presence and would treat any commercial Turkish aircrafts and ships as hostile.
The Turkish Embassy in Tripoli on its website Sunday advised its citizens to avoid any steps that will jeopardize their security and safety in the regions under control of the illegal militia loyal to Haftar.
It also urged Turkish citizens to stay away from conflict zones under control of the Government of National Accord which is recognized as the only legitimate government by the U.N. and international community.
Defense Minister Hulusi Akar said earlier Sunday that any aggression toward Turkey by Haftar's forces would carry a heavy cost and incur effective and strong retaliation.
The self-styled Libyan National Army, led by Haftar, launched a surprise offensive against the capital Tripoli in April, a move that could potentially drag the country back into civil war.
Libya has remained beset by turmoil since 2011 when a bloody NATO-backed uprising led to the ouster and death of longtime leader Muammar Gadhafi after more than four decades in power.
Since then, Libya's stark political divisions have yielded two rival seats of power — one in Tobruk and another in Tripoli — and a host of heavily armed militia groups.