More than £12 million was paid out in legal costs and compensation to asylum seekers and other immigrants last year, figures have showed.
The UK Border Agency (UKBA) paid a total of £14.2 million last year in compensation, legal costs and ex gratia payments, up almost £2 million on the previous year, the agency's annual report for 2010/11 showed.
This included payments to families who were unlawfully detained and removed, as well as £175,000 in compensation to an asylum seeker who was unlawfully detained and injured while in custody.
Legal costs alone topped £7.7 million in just over 1,000 cases, compared with £3.8 million for 691 cases in 2009/10.
More than £4 million was also paid out in 152 cases where each individual compensation payment was less than £250,000.
This compared with 837 such cases in 2009/10 which led to £4.4 million in compensation being paid.
The UKBA report also said the agency had "various legal claims which are currently outstanding" and had set aside £4 million, "based on past experience", for "a number of cases of unlawful detention".
A UKBA spokeswoman said: "Detention is a necessary part of the process to remove some individuals with no right to be here.
"Cases vary from foreign national prisoners who have served their sentences but are awaiting deportation, to failed asylum cases and individuals found overstaying their visas.
"We use our powers to detain individuals when we believe it is reasonable and lawful to do so and regularly review the system."
In January, failed asylum seekers won the right to claim damages which could run into thousands of pounds after the High Court ruled that three young children were held at an immigration detention centre unlawfully.
The ruling was a legal victory for the mothers - Reetha Suppiah, 37, a Malaysian nurse, and Sakinat Bello, 25, a Nigerian national - who brought the legal challenge.
Both said a lack of safeguards at Yarl's Wood in Bedfordshire, the UK's main removal centre for women and minors, led to their children suffering distress and trauma.
Mr Justice Wyn Williams, sitting in London, ruled that the Government's current policy on detaining families with children pending deportation was not unlawful, but - in the cases being considered - it had not been applied by the UKBA "with the rigour it deserves".
As a result, "the claimants were detained unlawfully from the time they were taken into custody until their release" and they were entitled to claim damages.
The judge said: "The cases of the two families involved in this litigation provide good examples of the failure by UKBA to apply important aspects of the policy, both when the decisions were taken to detain each family and when decisions were taken to maintain detention after removal directions had been cancelled."
The judge declared that the families' rights to private and family life under Article 8 of the European Convention on Human Rights had been breached, along with their Article 5 right to liberty.
But he rejected claims that their right not to be subjected to inhuman and degrading treatment had been infringed.
Both mothers were failed asylum seekers arrested by UKBA officers in dawn raids on their homes last February.
They were taken to Yarl's Wood for removal back to their country of origin on the basis that they had no right to remain in the UK.
Ms Suppiah and her two boys, aged one and 11, were detained for 17 days, while Ms Bello and her two-year-old daughter were held for 12 days before being released and allowed back into the community pending their legal challenges.