President Jacques Chirac of France has pledged to forge a "true partnership" with Libya on the first visit by a French leader since 1951.
Chirac gave Gaddafi a rare edition of Montesquieu as a gift
Mr Chirac, whose 24-hour trip culminated in talks with Col Gaddafi in a Bedouin tent, said the two states could open a "new chapter".
Ties had been frozen for years with Tripoli seen as a sponsor of terrorism.
Observers say the visit confirms the gradual return of Libya's leader to international acceptance.
President Chirac left Libya for Burkina Faso where the 10th annual summit of French-speaking nations is due to open on Friday.
Wrapping up their final round of talks, Mr Chirac and the Libyan leader walked out of the tent in Col Gaddafi's old residence with smiles and a handshake for the cameras.
Col Gaddafi described the overall outcome of the French president's visit as "very good".
Mr Chirac said his talks underscored France's determination to "turn the page on a past of painful memories".
The last remaining hurdle to restoring relations with France was overcome in January when Tripoli agreed to pay compensation to the families of those killed when a French airliner was blown up over Niger in 1989.
The attack on the UTA passenger jet killed 170 people, including 54 French nationals.
Mr Chirac had with him a large delegation of business leaders keen to win contracts with Libya, whose oil-rich economy is due to be liberalised.
"It is a promising market - we must do the maximum to support
it," Mr Chirac told reporters.
His visit follows similar trips this year by UK Prime Minister Tony Blair and German Chancellor Gerhard Schroeder.
Europe lifted its sanctions and arms embargo on Libya after Col Gaddafi last year denounced terrorism and agreed to stop developing weapons of mass destruction.