Who is Libya's Saif al-Islam Gaddafi?
Saif al-Islam Gaddafi has been freed after six years in captivity.
His capture in southern Libya in November 2011, following three months on the run and weeks after his father's death, was an ignominious end for a man once widely considered Colonel Muammar Gaddafi's heir apparent.
Despite holding no official position in the Libyan government, he was long seen as the most influential figure in the country after his father who had been in power since 1969.
This stylish English-speaker was even considered the reformist face of the Libyan government - until the 2011 rebellion, and the government's response.
As rebels closed in on the capital, the second of Gaddafi's nine children vowed to fight to the end against the insurgents, accusing them of being drunkards, thugs and terrorists.
But after the rest of his family fled, or were killed, he ended up being held in the city of Zintan for almost six years, sentenced to death by firing squad in absentia by a court in Tripoli during that time.
The few pictures released in the last few years show he is missing fingers. The BBC's John Simpson noticed he was missing part of a front tooth during one hearing early in his captivity.
And he is also wanted by the International Criminal Court (ICC), accused of crimes against humanity for his alleged role in the suppression of opposition protests in 2011.
Born in 1972, he played a key role in Libya's rapprochement with the West between 2000 and the 2011 uprising.
As head of the Gaddafi family's charity and allegedly the multi-billion dollar sovereign wealth fund, the Libyan Investment Authority (LIA) - although he denies this - Gaddafi had access to huge amounts of money, which he used to smooth relations with the West.
He was involved in the negotiations which led his father to abandon his nuclear weapons programme and later helped mediate the release of six Bulgarian medics accused of infecting children with HIV in a Libyan hospital.
He also negotiated compensation for the families of those killed in the 1988 Lockerbie bombing, the 1986 Berlin nightclub attack and the 1989 downing of UTA flight 772.
Again, he is said to have been involved in talks about the controversial 2009 decision to free from prison the man convicted of the Lockerbie bombing, Abdelbaset al-Megrahi.
After these agreements, international sanctions were lifted and with Gaddafi prominent both politically and economically, Libya seemed set to embark on an era of remarkable change.
Its oil sector was starting to open up and Libya had agreed to tackle the growing flow of sub-Saharan African migrants through the country to Europe.
Mr Gaddafi owned a house in London and had links to British political figures as well as the Royal Family. He met the Duke of York twice - once at Buckingham Palace and on another occasion in Tripoli.
He is known to have kept two tigers as pets and also enjoyed hunting with falcons in the deserts - a pastime traditionally enjoyed by Arab royals - and is a keen amateur painter.
Gaddafi, whose first names mean Sword of Islam, always denied that he was seeking to inherit power from his father, saying the reins of power were "not a farm to inherit".
He also called for political reform - a theme he addressed in the doctorate he obtained the same year from the London School of Economics (LSE).
When his role in the crackdown against protesters was reported, LSE director Howard Davies resigned from his post after facing criticism for accepting donations from the charitable foundation led by the son of the then Libyan leader.
The University of London was asked to investigate the authenticity of Gaddafi's PhD thesis, amid reports it was plagiarised - but it decided it should not be revoked as "the thesis has been annotated to show where attribution or references should have been made," an LSE statement said.
Gaddafi was caught on 19 November 2011, a month after his father died after being caught by rebel forces in his home town of Sirte.
The rebels claimed to have captured him in August 2011, during their advance on Tripoli, but he later turned up outside a hotel in the capital, greeting crowds of cheering supporters, before disappearing again.
The militia holding him in Zintan wanted him to be tried in that city - and not the ICC. In the end, he was tried in absentia in 2015 by a court in Tripoli.
"I am not afraid to die but if you execute me after such a trial you should just call it murder and be done with it," Gaddafi was quoted by lawyers as saying early on in his captivity.
However, it seems he will not face a firing squad in Tripoli: if reports are to be believed, he has gone to the east of the country, where a rival Libyan government has granted him amnesty.