LONDON (Reuters) - Britain has apologized to a Libyan former rebel and his wife over the role of British spies in their 2004 rendition to Libya, where they were detained and the husband was tortured by Muammar Gaddafi’s henchmen.

Libyan politician Abdul Hakim Belhadj, a known opponent of Gaddafi's regime, speaks during a news conference in Istanbul, Turkey May 10, 2018. REUTERS/Kemal Aslan

Abdul Hakim Belhadj, a known opponent of Gaddafi’s regime, and his pregnant wife Fatima Boudchar were abducted by CIA agents in Thailand after a tip-off from British spies, then illegally transferred to Tripoli.

“It is clear that you were both subjected to appalling treatment and that you suffered greatly, not least the affront to the dignity of Ms Boudchar who was pregnant at the time,” Prime Minister Theresa May wrote in a letter to the couple made public on Thursday.

At the time, Britain and the United States were trying to mend relations with Gaddafi’s Libya for geopolitical reasons, after years during which the Tripoli regime had been an international pariah.

Belhadj was hooded and shackled to the floor of the airplane in a stress position during his 17-hour flight back to Libya, where he was then detained for six years in brutal jails. Boudchar was detained for four months and released three weeks before giving birth.

She was in the public gallery in parliament in London with her son on Thursday to hear a public statement about the case, during which May’s letter of apology was read out in full by Britain’s attorney general.

“The UK government believes your accounts. Neither of you should have been treated in this way,” the letter said.

“The UK government’s actions contributed to your detention, rendition and suffering ... On behalf of Her Majesty’s Government, I apologize unreservedly.

“We should have understood much sooner the unacceptable practices of some of our international partners.”

Slideshow ( 14 images )

A FAX FROM MI6

Under the administration of former President George W. Bush, the CIA practiced so-called “extraordinary renditions”, or extra-judicial transfers of people from one country to another, in the wake of the Sept. 11, 2001 attacks. Other nations are alleged to have lent assistance in some cases.

The practice has been widely denounced around the world.

The British role in the rendition of Belhadj and Boudchar came to light after documents were discovered in the headquarters of the Gaddafi regime’s intelligence agency after the dictator was toppled in a 2011 revolution.

The documents included a fax apparently sent by MI6, Britain’s foreign intelligence agency, to the Libyan intelligence services in March 2004, giving information about the couple’s then whereabouts in Malaysia.

In written statements sent by their lawyers shortly after the apology was made public, Belhadj and Boudchar thanked the British government.

“A great society does not torture, does not help others to torture, and when it makes mistakes it accepts them and apologizes,” Belhadj said.

The couple had brought legal claims against Britain’s former foreign affairs minister, a senior intelligence chief and various government departments and agencies, seeking an apology and symbolic damages.

The British government tried to fight the claims in court but the Supreme Court last year gave the couple the right to sue the defendants.

Attorney General Jeremy Wright told parliament all the claims had now been withdrawn as part of a full and final out-of-court settlement.

As part of that settlement, the government agreed to give Boudchar 500,000 pounds ($676,000) in compensation for her suffering. Belhadj, who had said all along he was seeking an apology rather than money, did not receive a financial settlement.

Wright said no admissions of liability had been made by any of the defendants in the legal claims.

After his release, Belhadj went on to command an Islamist rebel group that helped topple Gaddafi in 2011. He is now a politician in Libya.