The Home Office has been accused of locking up innocent migrants for its own “administrative convenience” after new figures revealed 20 people have been held without trial for at least two years. One detainee has been in custody awaiting deportation for 1,701 days - approaching five years. Three more have been held for three years.

Prolonged incarceration poses a serious mental-health risk to detained migrants, many of whom are later allowed to stay in the UK. Last night migration campaigners compared the situation to Guantanamo Bay, where detention without trial has aroused international condemnation.

Jerome Phelps, the director of Detention Action, told The Independent: “The US has been widely condemned for detention without trial in Guantanamo, yet the UK stands revealed as locking up migrants for comparable periods in immigration detention centres. These people are detained for deportation, but it stretches credibility to believe that it can take more than four-and-a-half years to deport someone.”

Yarl’s Wood near Bedford, where many are held solely under immigration powers (Getty)

Figures released by the Home Office yesterday following a Freedom of Information request reveal that 20 migrants have spent at least 722 days in detention under immigration powers.

In total, 3,378 people are detained “solely under Immigration Act powers” - meaning they are not serving time for a criminal offence - in removal centres such as Yarl's Wood, which has faced allegations of abuse and mistreatment of inmates by staff.

The figures “exclude people detained under both criminal and immigration powers”, according to the Home Office document, which is a snapshot of the situation in September 2014. Most of those in detention are failed asylum-seekers, while others may be those whose visas may have run out, or people who lived in Britain with indefinite leave to remain until being given a deportation order, say campaigners.

Most long-term detained migrants are often from countries with barriers to removal such as Somalia, Iran, and Eritrea - all of which are reluctant to provide travel documents to returning nationals. Some will be in detention because they are ex-offenders and considered a “flight risk”. Successful claims against the Government for unlawful detention cost the Home Office several millions pounds a year in compensation, with more than £16m paid out in the past four years.

More than 60 per cent of migrants who are detained for more than a year are ultimately released, not deported, according to Mr Phelps.

“The Home Office is simply warehousing unwanted migrants, at vast public expense, causing incalculable damage to their mental health,” he added.

Labour's shadow Home Secretary Yvette Cooper said: “It is disgraceful that some people are being detained for over four years. No visa or asylum application process should take that long. People should either be granted leave to stay in the country or, if they don't have a right to be here, they should be deported. Such long detention periods benefit nobody - it is traumatic for those being detained and it is incredibly expensive.”

Don Flynn, the director of Migrants' Rights Network, said: “These 20 people who have spent between two and nearly five years in detention have not been convicted of any criminal offence. They have been deprived of their liberty for the administrative convenience of the Home Office.”

Moazzam Begg was held in detention in Guantanamo Bay between 2002-5 (PA)

One former detainee, Abdal, from Sudan, said: “I was detained for three-anda-half years. It was worse than the physical torture I experienced in my country, because with the torture you get a break between beatings. You never know when the psychological pain of detention will end.”

The 31-year-old is waiting for compensation after winning a High Court case for unlawful detention.

The Liberal Democrat MP Sarah Teather is chairing a cross-party inquiry into immigration detention which will produce its report next month. She said: “There can be no justification for locking people up for years and years for no other reason than administrative convenience. Britain is alone in the EU in not having a time limit on how long people can be held in immigration detention.”