Saudi authorities have freed a man who was sentenced to death for protest-related crimes as a child in a case that provoked an international outcry.
Ali al-Nimr was 17 when he was detained in 2012 during anti-government protests by the kingdom's Shia Muslim minority.
In 2014, a court condemned him to death by "crucifixion" - beheading followed by the public display of his body.
The sentence was commuted in February after the king ended the death penalty for some crimes committed by children.
Saudi Arabia is among the world's major executioners. It put to death at least 40 people between January and July - more than during the whole of last year, when it held the presidency of the G20.
Ali al-Nimr is the nephew of the prominent Shia cleric Sheikh Nimr al-Nimr, who was executed for terrorism offences by Saudi authorities in 2016.
The sheikh was a vocal supporter of the Arab Spring-inspired protests that erupted in Eastern Province in 2011. They were led by local Shia, who have long complained of being marginalised by Saudi Arabia's Sunni monarchy.
Ali al-Nimr was arrested at one of those protests in February 2012 and was subsequently found guilty by a terrorism tribunal of "breaking allegiance with the ruler", "repeating some chants against the state", and attacking police with Molotov cocktails and rocks.
He denied the charges and told the court that security officers had extracted his "confession" through torture.
Four months later, the same court sentenced to death two other young Shia activists convicted of similar protest-related charges in a separate case.
Abdullah al-Zaher and Dawood al-Marhoun, who were aged 15 and 17 respectively when they were detained, also testified that they had had been beaten until they signed confessions.
Despite appeals for clemency from their families and human rights organisations the three were kept on death row until earlier this year, when the Saudi Human Rights Commission announced that their sentences had been commuted to 10-year prison terms.
The commission cited a 2018 law that prohibits the death penalty for child offenders in some cases and an unpublished 2020 royal decree that allows the law to be applied retroactively.
Although Ali al-Nimr was freed from prison on Wednesday, Abdullah al-Zaher and Dawood al-Marhoun remain behind bars, according to the anti-death penalty charity Reprieve.
Its director Maya Foa called the release a "tangible sign of progress", but warned that Saudi Arabia still sentenced people to death for childhood crimes.
In June, another man convicted of protest-related crimes when he was a child was executed despite the partial moratorium on the death penalty. Mustafa al-Darwish, who was 17 when he was arrested in 2015, said he was tortured into making a false confession.
Nineteen-year-old Abdullah al-Howaiti, who was convicted of robbing a jewellery store and fatally shooting a police officer when he was aged 14, is also currently on death row.