Britain apologised on Thursday for contributing to the mistreatment of Abdel Hakim Belhaj, a former Islamist fighter turned politician who was kidnapped and handed over to Libya in 2004 and subsequently tortured, in an unprecedented admission of culpability.
"The UK government's actions contributed to your detention, rendition and suffering," Prime Minister Theresa May said in a letter to Belhaj and his wife Fatima Boudchar, which was read out in parliament by Attorney General Jeremy Wright.
"On behalf of Her Majesty's government, I apologise to you unreservedly," the letter read.
Belhaj, who became Tripoli's military commander after Libyan leader Moamer Kadhafi was ousted in the 2011 revolution, claimed British complicity in the couple's capture by the CIA and later torture by his regime.
The British government accepted the couple "were subjected to a harrowing ordeal which caused them significant distress", and said that it had reached "a full and final settlement" with them both.
Boudchar will receive £500,000 (570,000 euros, $670,000) compensation, but Belhaj did not seek any financial settlement, only an apology.
At a news conference in Istanbul, where he lives, Belhaj expressed "his gratitude for this courageous move".
"This apology is accepted and it puts an end to years of suffering," he said.
In an earlier statement, he argued Britain had "set an example for other nations to follow".
"For more than six years I have made clear that I had a single goal in bringing this case: justice. Now, at last, justice has been done," he said.
"A great society does not torture; does not help others to torture; and, when it makes mistakes, it accepts them and apologises."
Boudchar was four-and-a-half months pregnant when she was kidnapped, telling the Guardian that she had been taped to a stretcher for the 17-hour flight to Tripoli.
She was released shortly before giving birth.
"This is a historic day," Boudchar told reporters outside Britain's parliament.
"My message to the world's governments is to support solidarity with no injustice to others."
Belhaj was held for more than six years and said he was subjected to torture.
"Your accounts were moving and what happened to you is deeply troubling," wrote May.
"The UK government believes your account, neither of you should have been treated in this way".
The prime minister added that "we should have understood sooner the unacceptable practices of some of our international partners. We sincerely regret our failures."
Belhaj initially said he was taking action against MI6's former counter-terrorism chief Mark Allen.
Papers found after Kadhafi's ouster showed the British official had told the Libyan government that it was "the least the UK could do" to help capture Belhaj.
He also sued ex-foreign secretary Jack Straw, but dropped both of the cases as he mediated a "full and final settlement" with the government.
Cori Crider, a lawyer for the family from London-based human rights group Reprieve, called the settlement "a victory for everyone who opposes injustice, secret detention, and torture".
The Freedom from Torture organisation said it should be "the beginning not the end of a proper accounting for the sinister pattern of UK complicity in the years after the 9/11 attacks".
Chief executive Sonya Sceats added: "It is even more urgent that the government goes ahead with the judge-led inquiry into UK involvement with torture as promised by (former prime minister) David Cameron".
Cameron set up an inquiry in 2010 headed by a retired appeal court judge, but it has stalled over secrecy concerns and issued only an interim report in 2013.
Belhaj fought against Soviet forces in Afghanistan and became the leader of the Libyan Islamic Fighting Group (LIFG), which sought to overthrow Kadhafi and replace his regime with an Islamic one.
Following his release from prison in Libya, Belhaj founded the conservative Islamist party Al-Watan and a pro-Islamist television channel.
He had an office in Tripoli where he regularly received Western envoys.
Belhaj and his men were part of the Fajr Libya faction which seized Tripoli in 2014.
As a party leader, he participated in talks held in Morocco which brought about Libya's interim Government of National Accord (GNA) in December 2015.
However, he has vanished from Libyan public life since then and is now based in Istanbul.
In May 2017, pro-GNA armed groups seized the prison where former leaders of the Kadhafi regime, including Abdallah Senoussi and Saadi Kadhafi, were being held under the control of Belhaj's men.
The same day, the headquarters of his television channel was torched.
It was later transferred to Istanbul from where it continues to campaign.