Saadi Gaddafi was imprisoned in Tripoli since his extradition from Niger in 2014. He immediately departed on a plane to Turkey's city of Istanbul following his release, an official source said.
Libyan authorities have released Saadi Gaddafi, a son of the former leader Muammar Gaddafi who was ousted and killed during a 2011 uprising, a Libyan official source and a unity government source said on Sunday.
Saadi Gaddafi fled for Niger during the NATO-backed uprising, but was extradited to Libya in 2014 and has been imprisoned since then in Tripoli.
He immediately departed on a plane to Istanbul, the official source said.
Libya has suffered chaos, division and violence in the decade since the uprising. The Government of National Unity was installed in March as part of a peace push that was also meant to include elections planned for December.
His release resulted from negotiations that included senior tribal figures and Prime Minister Abdulhamid Dbeibeh, the official source said. Another source said the negotiations also involved former interior minister Fathi Bashagha.
In 2018 the Justice Ministry said Saadi Gaddafi had been found not guilty of "murder, deception, threats, enslavement and defamation of the former player Bashir Rayani".
In July the New York Times said it had interviewed Saadi's brother, Saif al Islam Gaddafi, who was held for years in the town of Zintan, as his supporters indicate he will run in the presidential elections planned for December.