The Home Secretary was ordered to pay damages to two asylum seekers after the Home Office failed to ensure they received prompt medical examinations.
The two asylum seekers spent time in Oakington Reception Centre
The two, who were detained at Oakington Reception Centre, Cambs, claimed they had been tortured in their own country.
A High Court judge said the government had breached rules which stated each person must be examined within 24 hours of admission to a detention centre.
The Home Office said it was "committed to learning lessons from the incident".
The regulation that each person must be examined within 24 hours is contained in Rule 34 of the 2001 Detention Centre Rules.
The case involved "D", a 28-year-old woman from the Ivory Coast, who used a false French passport to enter the UK in May 2005, saying she had been detained and tortured in her home country.
The second case concerned "K", a 38-year-old man from Turkey who arrived in the UK in April 2005 hidden in a lorry.
Mr Justice Davis said a nurse who eventually saw "K" noted he had injuries, and a doctor recorded evidence of scars and said they were consistent with burns inflicted and "most likely done deliberately".
The judge said the case of "D" was more difficult to assess, but concluded that an examination would have resulted in her release from Oakington.
He said the rules were introduced by the government to safeguard possible torture victims who might otherwise be detained while their asylum claims were "fast tracked".
If there was sufficient independent evidence of torture, an asylum seeker would usually not be detained, the judge said.
In the two cases, both were "wrongfully denied" an examination within 24 hours, he added.
Mr Justice Davis said the damages must be paid by Home Secretary because the government's stance had led to the breach of Rule 34.
The amount of damages for the time the two asylum seekers spent in Oakington has yet to be assessed.
A Home Office spokesman told BBC News: "The Home Office accepts today's judgment and regrets that these individuals were not seen by medical practitioners within 24 hours of their arrival and is committed to learning lessons from this incident.
"The Home Office takes very seriously the issue of healthcare within its removal centres and the health of all detainees is monitored closely, which includes access to primary and secondary medical facilities, including psychiatric professionals."