The Government has been forced to pay out millions of pounds in compensation to innocent people who were illegally locked up in Britain under immigration powers, The Independent can reveal.

Almost £14m was paid to hundreds of individuals who were incorrectly detained by officers for immigration offences they never committed.

The 573 people who received pay-outs over three years may include those the authorities thought had failed to leave the country on time, or who were wrongly accused of breaking the terms of their visa or obtaining it by deception.

After the detention numbers emerged critics accused the Government, which under Theresa May has announced plans for even tougher immigration powers, of leaving a "stain on our society".

It comes after an inspector's report found earlier this year that Europe’s largest immigration detention centre near Heathrow was "dirty and run down", with areas that were "overcrowded" and with "seriously insanitary" toilets and showers. Home Office statistics show that the total number of people being detained for immigration offences is growing – hitting 32,400 last year.

Data released to Parliament by immigration minister Robert Goodwill shows that in 2012/13, £5m was paid in compensation to 195 people wrongly locked up by the authorities.

The following year the Government paid £4.8m in unlawful detention compensation payments to 199 individuals. In 2014/15, £4m was paid to 179 innocent people. Over the three years the average pay-out was more than £24,000 per person.

Amber Rudd launches immigration crackdown

Liberal Democrat Leader Tim Farron, who uncovered the data, said: "It is outrageous that the Government is wasting taxpayers’ money on huge pay-outs for their mistakes. Locking innocent people up for administrative convenience is a huge stain on our society and this adds insult to injury.

"The Government should be finding ways to shrink the immigration detention estate but instead they are pouring money down the drain keeping this failing system alive."

The Migration Observatory at Oxford University states that the UK immigration detention estate is one of the largest in Europe. From 2009 until the end of 2015, between 2,500 and 3,500 migrants have been in detention at any given time. In 2015 32,400 people entered detention compared to some 30,400 in 2014.

Theresa May on immigration in conference speech

The largest category of immigration detainees is people seeking asylum, around 45 per cent of those detained in 2015. Data from early 2016 shows that about 81 per cent of immigration detainees are held for less than two months, but it is not uncommon for detention to span two to four months, with a small number held for longer.

A March report by the HM Inspectorate of Prisons into Harmondsworth detention centre, which has room for 661 people, found it to be overcrowded, with people being held for too long, sometimes in insect-ridden rooms.

Steve Symonds, Amnesty UK’s refugee programme director, said: "The millions of pounds in compensation paid out every year by this Government reflects the fact that immigration detention has become the norm, when it should only be used in exceptional circumstances.

MP calls for child refugees from Calais to have teeth checked to verify age

"Detention causes women, men and children to suffer serious and lasting harm, as this compensation attests, but the suffering of so many goes unnoticed and unseen. The awful truth is that people locked up in these detention centres are not being treated as human beings with rights, needs and vulnerabilities. As a matter of urgency, the Home Office should be significantly reducing its use of detention and its detention estate.”

At Conservative conference Home Secretary Amber Rudd was forced to deny that she was a racist after announcing an unexpectedly tough new regime of immigration controls for consultation. They included English tests for foreign students, mandatory checks for foreigners wishing to become taxi drivers and, initially, a suggestion that businesses could be forced to publish the proportion of foreign workers they employ, something ministers eventually backed down on.

Italian coastguard rescues thousands of refugees off coast of Libya

The Cabinet has been at odds over what kind of immigration system to bring in after Brexit, with Chancellor Philip Hammond raising concerns over the impact of shutting out low-skilled workers and backing removing foreign students from net migration data, something Ms May opposes.

The Government remains committed to bringing down net migration to the tens of thousands from its current level of more than 320,000.

Asked about the detention compensation figures, a Home Office spokesperson said compensation is paid at the end of litigation proceedings, a process that can last several years after the detention has ended.

They said decisions to detain are reviewed regularly to ensure they remain justified and reasonable, but also underlined that the government has a responsibility to protect the public from those who might pose a risk of harm.

The spokesperson said: “Detention is an important part of a firm but fair immigration system, helping to ensure that those with no right to remain in the UK are returned to their home country if they will not leave voluntarily.

“Decisions to detain or maintain detention are taken after careful consideration – and we are committed to treating all detainees with dignity and respect.

“The fact that a court may subsequently rule that an individual has been unlawfully detained does not necessarily mean the original decision was taken in bad faith. The court's findings may only relate to part of the detention.”