Pro-Turkish Syrians are fighting in Libya alongside military trainers dispatched by Ankara, Turkey's President Recep Tayyip Erdogan admitted for the first time on Friday.

Turkey supports the UN-recognised Government of National Accord (GNA) based in Tripoli and sent dozens of military training personnel after the two countries signed a series of deals last year.

More:

"Turkey is there with a training force. There are also people from the Syrian National Army," Erdogan told reporters in Istanbul, referring to the group of rebels fighting Syrian President Bashar al-Assad's government.

The GNA has been under sustained attack for months from eastern-based renegade military commander Khalifa Haftar, whose principal backers include the United Arab Emirates (UAE) and Egypt.

Last month, the warring sides agreed to a truce and although there have been violations, they have held two rounds of talks in Geneva.

Haftar, meanwhile, said he would agree to a permanent ceasefire if Syrian "mercenaries" left Libya, and Turkey ended its support for the GNA, according to RIA news agency.

"A ceasefire [would] be the result of a number of conditions being fulfilled … the withdrawal of Syrian and Turkish mercenaries, an end to Turkish arms supplies to Tripoli, and the liquidation of terrorist groups," Haftar was quoted as saying on Friday.

But Haftar warned he would not hesitate to use force if his conditions were not met.

New talks expected

The GNA in Tripoli agreed to resume negotiations on Thursday after suspending talks with Haftar's Libyan National Army (LNA) after rocket attacks on the capital's strategic port on Tuesday.

Several rounds of talks focused on economic issues, including fairer distribution of Libya's oil wealth, have also taken place in Egypt and Tunisia, while talks aimed at a political solution are scheduled to start in Geneva on February 26.

Ceasefire talks between Libya's warring sides are going in the "right direction" while hitting hurdles over violations of an arms embargo and the truce declared last month, the UN envoy for Libya Ghassan Salame told Reuters News Agency on Friday.

Salame, in an interview during a break in military talks in Geneva, said he expected political-level talks to convene in the Swiss city on February 26 but was already working on confidence-building measures.

"In parallel, we are trying to make air travel a bit safer in Libya especially from Mitiga as well as Misrata. We are also trying to reopen the port to be a safe harbour," Salame said. "And we are also trying ... to help in an exchange of prisoners between the parties."

Random bombing

Libya has been in turmoil since a 2011 NATO-backed uprising killed longtime leader Muammar Gaddafi, with rival armed factions still vying for power.

In the latest outbreak of fighting, Haftar launched an offensive on Tripoli last April. But after rapid advances, his forces stalled on the edges of the capital.

The fighting has killed more than 1,000 people and displaced some 140,000, according to the United Nations.

In the neighbourhood of al-Jaraba, in central Tripoli, residents told Al Jazeera they are still facing attacks despite the truce.

"The bombing is random, we live on our nerves," said Abdullah Hussein, an engineer.

"Any moment a bomb or rocket can hit. It's especially bad at night, we are too afraid to sleep. We have to be ready to run immediately. People now even know the types of bombs by their sounds, and this is supposed to be a ceasefire."