CAIRO — France’s foreign minister is visiting Libya to encourage the implementation of a reconciliation agreement reached by the main Libyan rivals in Paris in July.

Jean-Yves Le Drian met on Monday with Fayez Serraj, the prime minister-designate of the U.N.-backed government, in the capital, Tripoli. He is also visiting Misrata and Benghazi, where he will meet with factions opposed to Serraj.

In July, Serraj and Gen. Khalifa Hifter, the commander of Libya’s self-styled national army, committed to working toward presidential and parliamentary elections and finding a roadmap to secure the lawless country against terrorism and trafficking.

Libya was plunged into chaos after the 2011 NATO-backed uprising that toppled and killed longtime dictator Moammar Gadhafi.