The Ministry of Defence has been ordered to hand over any reports by British troops where they suspected US forces in Iraq were mistreating detainees.

The instruction to search for allegations of US military abuse has been authorised by Mr Justice Turner at the high court in London as the bitter legacy of the conflict continues to work its way through the courts.

The latest development could prove highly embarrassing for future US/UK military cooperation if any documents contain critical comments by British soldiers of their American allies.

The order follows two court hearings before the judge in late October that dealt with claims brought by the law firm Leigh Day on behalf of two, unnamed Iraqi suspects who were arrested in 2008 in Basra, southern Iraq, and handed over to US custody.

Both men, identified only as HTF and ZMS, allege they suffered repeated beatings and had hoods put over their heads so they could not breathe properly at a US facility known as Camp Harper within a British base in Basra.

Leigh Day, which says it is acting for about 45 Iraqis with similar claims, say the suspects were then flown to Baghdad International airport where they were handed over to US forces.

In US custody, it is alleged, detainees were subjected to hooding, excessive sensory and sleep deprivation, loud noise and solitary confinement as well as sexual and physical assaults by male and female US officers. Many were held for long periods. ZMS was not released for more than a year.

The men were detained on the grounds that they posed a threat to security. Their lawyers argue that the UK government knew or should have known that they would be exposed to inhuman and degrading treatment by US forces. British forces may therefore have been complicit in the mistreatment, it is claimed.

At a high court hearing in mid-October, the judge told the MoD that it must search its records and databases for any reports by British servicemen of alleged abuse or mistreatment of detainees by US personnel in Iraq between 2004 and 2008. At a later hearing he ordered disclosure of those reports by 26 November.

The court order specifies the types of internal records the MoD must disclose, including those known as SOI 990A reports, which cover the “procedure for assisting with the movement of high-value individuals into US detention”.

Part of the court order states: “The parties will co-operate in the formulation of appropriate searches by the [MoD]” relating to whether it “knew or ought to have known that, if transferred to the custody of [US] forces … the claimants would be exposed to a risk of unlawful detention [and] other unlawful acts.”

A preliminary search by the MoD is understood to have turned up 509 references but it is not yet clear how many, if any, are reports of suspicious incidents recorded by UK troops or whether they are merely policy files relating to the protocol for reporting such suspicions.

The MoD has maintained that because British forces were accompanied by a US custodial officer and were processed at Camp Harper the suspects were always under “the effective control of the US” and should not have been categorised as UK detainees. All of the men were eventually released from US custody without charge.

According to Leigh Day’s lawyers, there has been controversy over similar allegations involving Danish and Australian coalition forces in Afghanistan and Iraq over liability for subsequent mistreatment of detainees.

Benjamin Croft, the solicitor at Leigh Day handling the case, said: “Almost a decade on from the departure of British troops from Iraq, and despite three separate investigations, there remains a question mark over the extent of British complicity in the US mistreatment of civilians in Iraq.

“It is high time the government opened itself up to scrutiny on this issue and, hopefully, these cases will go some way towards answering those outstanding questions.”

“In-theatre” transfers of detainees from UK to US forces within Iraq and Afghanistan have not been investigated by previous inquiries.

An MoD spokesperson said: “As legal proceedings are ongoing we are unable to comment.” The US embassy did not immediately respond to a request for comment.

The UK government has been criticised for failing to meet its own deadline to decide whether to hold a judge-led inquiry into Britain’s involvement in post-9/11 human rights abuses and the use of torture.

Three months ago, Theresa May offered an apology for MI6’s role in the kidnap and torture of a Libyan dissident, Abdel Hakim Belhaj, and his wife in 2004.

In a separate development, the Solicitors Regulation Authority has confirmed it will not appeal against a high court ruling last month that cleared Leigh Day lawyers of wrongdoing over its pursuit of torture and murder claims against British troops in Iraq.