Qatar and Turkey have signed an accord to send military advisers and instructors for the armed forces of Libya's Government of National Accord, the UN-recognised GNA said.
"We have reached an agreement with Turkish Defence Minister Hulusi Akar and Qatar's (minister) Khaled bin Mohammad Al-Attiyah on tripartite cooperation to build a military institute for training," said the GNA's deputy defence minister, Salah al-Namrouch.
Both Sheikh Khaled, Qatar's minister of state for defence, and Akar were in Tripoli on Monday for meetings with the GNA's military and for talks on three-way military cooperation.
Under the accord between the three countries, Turkey and Qatar will send military advisers and provide training at their military academies for Libyan cadets, Namrouch said.
Also visiting Tripoli on Monday, German Foreign Minister Heiko Maas warned that Libya faces a "deceptive calm" since fighting stalled in June around the coastal city of Sirte.
Outside powers are "continuing to massively arm the country", said Maas, whose government has tried to broker peace in the war-torn North African country.
"In Libya at the moment we are observing a deceptive calm," he told journalists in Tripoli, seat of the GNA.
Libya has been in chaos since a Western-backed uprising toppled and killed longtime dictator Moamer Kadhafi in 2011.
The leader of the Libyan National Army (LNA) Khalifa Haftar launched an offensive in April 2019 to seize Tripoli.
After 14 months of fierce fighting, the Turkish-backed pro-GNA forces expelled LNA from much of western Libya and pushed them eastwards to Sirte, a gateway to Libya's rich oil fields and export terminals.
While the GNA has also been supported by Qatar, LNA has had the backing of the United Arab Emirates, Egypt, Saudi Arabia and Russia.