The Libyan government says it has concluded an agreement with Qatar and Turkey.
The deal should overlay the way for the arrival of military advisers from the countries and help train Libyan troops.
Ministers from Turkey and Qatar were in the capital Tripoli on Monday to discuss military cooperation.
Among other things, it would have been agreed that Libyan soldiers would be trained in the military academies of the two countries.
Libya has been in bedlam since the death of dictator Muammar Gaddafi in 2011. Powerful warlord Khalifa Haftar launched an offensive last year to seize Tripoli, but his forces have been pushed back after heavy fighting.
German Foreign Minister Heiko Maas warned during a visit to Tripoli that foreign powers are still arming their allies in Libya.
The recent calm in the North African country could be “misleading”, he says.