A British court on Friday made public a ruling criticizing domestic intelligence agency MI5's handling of alleged victim of torture overseas, rejecting a government attempt to keep it secret.

A three-judge panel at Britain's Court of Appeal published a paragraph of a judge's draft ruling that was previously withheld after government lawyer Jonathan Sumption complained it contained unsubstantiated criticism.

That ruling published details of the mistreatment of ex-Guantanamo Bay detainee Binyam Mohamed, who alleges he was tortured in Pakistan in 2002.

MI5 has previously denied it was aware of Mohamed's mistreatment, a claim rejected by David Neuberger, one of the country's most senior judges, in a first draft of his ruling.

In the paragraph disclosed Friday, Neuberger questions MI5's claim to operate to the highest standard of human rights.

"As the evidence in this case shows, at least some SyS (security service) officials appear to have a dubious record when it comes to human rights and coercive techniques," his original ruling said. The paragraph was part of the information disclosed Friday.

He also criticized MI5 for seeking to suppress information about the case, suggesting it called into question evidence the agency had provided to a Parliamentary oversight committee.

Lawyers acting for Mohamed, and media organizations — including The Associated Press — had demanded the details of Neuberger's original ruling be released. They said they were not made aware a government lawyer had been in contact with the court over the judgment until shortly before the ruling was issued.

The attorneys said that Sumption's letter may have violated a long-standing legal precedent that governments should not secretly communicate with judges over legal rulings. Britain's government denied any precedent had been breached.

Police are currently investigating whether one MI5 officer is guilty of criminal wrongdoing in relation to the alleged torture of Mohamed.

Neuberger said in both his original ruling, and an amended version published Friday, that other officials were likely implicated. "Some Security Services officials appear to have a dubious record relating to actual involvement, and frankness about any such involvment, with the mistreatment of Mr. Mohamed, when he was held at the behest of U.S. officials," the judge's latest ruling said.

Ethiopian-born Mohamed, a British resident, was arrested in Pakistan in 2002 and says he was tortured there and in Morocco before being flown to Guantanamo Bay. He was released in February 2009, having never faced a trial.