Six Turkish sailors detained in Libya by Khalifa Haftar’s forces have been released, Turkey’s foreign ministry has said, a day after Turkey warned his Libyan National Army (LNA) militia would become a “legitimate target” unless the men were released immediately.

The six men appear to have been captured by the LNA as a reprisal for Haftar losing control of a key town that has set back his efforts to capture Libya’s capital, Tripoli, from the UN-recognised Government of National Accord (GNA).

Turkey backs the GNA and has been accused by Haftar of supplying weaponry to the GNA in breach of a UN arms embargo, as well as operating drone strikes on his forces from the GNA military command headquarters.

Haftar has also ordered that in his strongholds in the east of the country all Turkish nationals should be arrested and all restaurants and shops with Turkish names or products be closed. The six men were arrested as part of Haftar’s anti-Turkish drive, and it is not clear if their release signalled that Haftar recognised he had overstepped the mark.

The Turkish foreign ministry spokesman said the six men wanted to continue working rather than return to Turkey. The state-owned news agency Anadolu said they were sailors but Turkey’s defence ministry had denied reports that the detainees included military personnel.

The forces loyal to Haftar also said they destroyed a Turkish drone parked at Tripoli’s only working airport on Sunday and declared a “general mobilisation” as tensions between Ankara and the eastern administration mounted.

In a surprise attack last week that caught Haftar’s forces off guard, the GNA captured the town of Gharyan, breaking the military stalemate that has prevailed since Haftar moved to capture Tripoli on 4 April.

Haftar expected to enter the city within days but has found himself bogged down in fighting that has begun to lose him much-needed diplomatic support.

On Friday, Haftar’s spokesman Ahmed al-Mismari announced a ban on commercial flights from Libya to Turkey and ordered his forces to attack Turkish ships and interests in Libya.

Haftar’s air force commander, Mohamed Manfour, stepped up warnings on Sunday by telling Tripoli residents to stay away from any site that may be hit by airstrikes.

Manfour said: “After exhausting all the traditional means in the battle for liberating the rest of Libya and after the recent deception and treachery, the LNA’s air force started to carry out strong and decisive airstrikes on select locations.

“We call upon all our people in Tripoli to immediately move away from the military sites, the positions of militias and terrorists, for their safety that is our priority as well as our beloved united and free Libya.”

Intensified strikes on Sunday night hit the outskirts of Tripoli, including in the area surrounding the city’s non-functioning international airport, Yarmouk camp and Ain Zara district.

Haftar himself has been supplied with weapons by the United Arab Emirates and Egypt. The extent of Haftar’s dependence on the UAE for weaponry was underlined when UAE-marked weapons left by fleeing LNA fighters were displayed in Gharyan at the weekend.