NEW home secretary James Cleverly is being urged to end the indefinite detention of people seeking refuge and asylum.

Analysis by Holyrood researchers has found that the UK is one of the few countries in Europe to have no limit on the length of time asylum seekers can be detained.

Most countries have set a maximum length of detention of asylum seekers.

They include Spain which has the shortest detention length of 10 days, Germany 28, France 45 days, and Latvia and Poland 60 days.

READ MORE: FM expresses Scotland's 'shock and sorrow' at violence in Dublin

Countries with significantly long periods in which asylum seekers can be held in detention are Greece - 1095 days, Netherlands 450, Denmark 540.

Italy, Finland, Sweden and Luxembourg each have a limit of 365 days. Along with the UK, Ireland, Cyprus and Hungary have no limit on how long an asylum seeker can be held in detention.

The data has been published by the Scottish Parliament's research unit using information obtained from the Global Detention Project.

“Detaining asylum seekers is morally repugnant – it is our moral duty to help those fleeing violence and persecution, not lock them up," said SNP MSP Karen Adam.

READ MORE: Alister Jack should resign if he can't stand up to James Cleverly'

“The UK government’s approach to asylum is disgraceful and these figures show that across Europe they are a shameful outlier. The Home Secretary must urgently address this.

"Labour and the Tories obsession with the hostile environment is failing asylum seekers - detaining vulnerable people can lead to long lasting mental health issues and the fact neither party wants to tackle this issue is not good enough.

“Whilst Scotland remains under the control of a cruel Westminster immigration system, asylum seekers continue to face hardship and anxiety. The only way to guarantee that Scotland’s immigration system is based on the values of fairness and dignity is with the full powers of an independent country."

READ MORE: Subscriptions from The Herald (heraldscotland.com)

UK ministers argue that a time limit on immigration detention would significantly impair the Home Office's ability to remove people who have breached immigration laws and refused to leave the UK voluntarily.

Under the Illegal Migration Act, if individuals come to the UK illegally, the Home Office will be able to detain them for 28 days without recourse to immigration bail or judicial review, and will be able to detain them as long as there is a reasonable prospect of removal.

Mr Cleverly was appointed home secretary by Prime Minister Rishi Sunak last week in his reshuffle following the sacking of Suella Braverman from the post after a series of controversies which included attacks on the homeless and the police.

In his first interview since he took on the role, Mr Cleverly appeared to take a different approach from his predecessor telling The Times on Saturday that leaving the European Convention on Human Rights would undermine attempts to tackle illegal migration and stop the boats and urged people not to “fixate” on the Rwanda migration scheme.

On his second day in the job the Supreme Court ruled that the UK Government’s policy to remove illegal migrants to Rwanda was unlawful. On Thursday official figures revealed that legal migration has risen to record levels: 745,000 last year, 670,000 this year.

The Supreme Court raised fundamental institutional concerns about Rwanda’s migration system. It found that it appeared to be “prejudiced” against Afghan, Yemeni and Syrian refugees, rejecting 100 per cent of their applications, and that while a route of appeal to the Rwandan High Court existed technically it had never been used.

A Home Office spokesperson said: “Under the Illegal Migration Act, people who come to the UK illegally will be detained and promptly removed, to their home country or a safe third country.

“Immigration detention allows the government to maintain effective immigration control and protect the UK and our communities.”