Ambassador to UK was previously in charge of Bahraini agency that is accused of electric shocks and beatings.
The former head of an agency accused of torture and human rights abuses is expected to be a guest at Friday's royal wedding, the Guardian has learned.
Sheikh Khalifa Bin Ali al-Khalifa is a former head of Bahrain's National Security Agency (NSA) and will attend the wedding in his role as the current Bahraini ambassador to London.
British sources confirmed he had been invited and a spokesperson for the Bahraini embassy in London said he was expected to attend.
Khalifa was head of the agency from 2005 to 2008. The pressure group Human Rights Watch alleges that in 2007 detainees in Bahrain suffered torture including electric shocks and beatings.
On Thursday an invitation to attend the wedding was withdrawn from the Syrian ambassador to London because of concerns over domestic repression and human rights abuses. Libya is also excluded.
Bahrain has in recent months been wracked by protests and its government has been accused of unleashing a violent crackdown on dissent.
The concerns led to Bahrain's crown prince declining to attend the wedding after originally being invited. However an invitation remains open to Khalifa, who became Bahrain's ambassador to London in 2008.
According to the ambassador's biography on the embassy's website, he was head of the NSA from 2005 to 2008 before taking up the London posting.
A spokesperson for the Bahraini embassy in London confirmed the ambassador had been invited to the wedding and said: "I'm expecting he's going to participate."
A spokesperson for St James's Palace said: "All heads of mission in London from countries with whom the United Kingdom is in normal diplomatic relations have been invited to the wedding. We acted in consultation with the Foreign and Commonwealth Office."
A Human Rights Watch report on torture in Bahrain found: "Since the end of 2007 officials again have used torture and ill-treatment, particularly during the interrogation of security suspects. Human Rights Watch's conclusion is based on interviews with former detainees and others, as well as its review of government documents.
"Security officials appear to have utilised a specific repertoire of techniques against many of those arrested designed to inflict pain and elicit confessions. These techniques included the use of electro-shock devices, suspension in painful positions, beating the soles of the feet (falaka) and beatings of the head, torso, and limbs.
"Some detainees also reported that security officials had threatened to kill them or to rape them or members of their families."
The report implicates Bahrain's NSA: "Most of the former detainees who spoke with Human Rights Watch said that they had been subjected to torture and ill-treatment at the headquarters of the ministry of interior's general directorate of criminal investigation (CID) ... and/or at the offices of the NSA, also on the grounds of the ministry of interior."
The report tells of a group of men who claimed to have suffered torture at the hands of the NSA. "Seventeen of the men also identified one or more of the officers from the CID or NSA who they claimed participated in their torture."
The decision to rescind the royal wedding invitation to Dr Sami Khiyami, the Syrian ambassador, was made after the foreign secretary, William Hague, decided it would be "unacceptable" for a representative of the Syrian government to attend in the light of the killing of hundreds of pro-democracy demonstrators.
Salman bin Hamad al-Khalifa, crown prince of Bahrain, where at least 30 people have been killed in recent demonstrations, put out a statement on Sunday saying that with "deep regret" he had to decline his invitation, complaining that media reports about his attendance "clearly sought to involve my potential attendance as a political proxy for wider matters involving Bahrain". The invitation had been criticised by human rights groups.
One alleged victim of the torture in Bahrain deplored the decision to invite the ambassador. The victim was granted asylum in Britain after claiming he had been ill treated in Bahrain and persecuted.
Moosa Abdul Ali Mohammed, 30, says on two occasions he suffered beatings, sexual violence and threats against his family.
Mohammed, who now lives in London, said: "He is a bad man. I was tortured while he was in charge. It's a bad thing he is invited to the wedding."
Vikram Dodd, guardian.co.uk