Saif al-Islam Gaddafi, second son of the late deposed Libyan leader Col Muammar Gaddafi, is said to have been freed under an amnesty.
Believed to have been his father’s preferred successor, he had been held by a militia group in the town of Zintan for the past six years.
The group announced on Saturday that he had been released.
He was sentenced to death by a court in Tripoli in 2015 but the group had refused to hand him over.
There had been false reports about Saif al-Islam Gaddafi’s release previously.
He is also wanted by the International Criminal Court for crimes against humanity during his father’s unsuccessful attempts to put down the rebellion.
The 44-year-old – who was controversially granted a PhD by the London School of Economics in 2008 – was captured in November 2011 after three months on the run following the end of Gaddafi’s decades-long rule.
He was previously known for playing a key role in building relations with the West after 2000, and had been considered the reformist face of his father’s regime.
But after the 2011 uprising, he found himself accused of incitement to violence and murdering protesters. Four years later, he was sentenced to death by firing squad following a trial involving 30 of Gaddafi’s close associates.
It does not appear that anyone from the government in Tripoli has confirmed his release, or the agreement under which it took place.
However, a press release on the militia group Abu Bakr al-Siddiq Battalion’s Facebook page attributed the amnesty to an act of parliament.