Watchdogs have criticised the prolonged detention of detainees at the Dungavel immigration removal centre.

HM Inspectorate of Prisons (HMIP) said some people were being held for unreasonably long periods at the unit, often because of avoidable casework delays, especially in the processing of asylum claims.

In an independent report, the watchdog confirmed reports one individual had been detained for two and a half years.

That is the kind of sentence a Scottish court would only give for a serious crime, and with at least a sheriff and jury deciding the matter.

Inspectors, who visited Dungavel in February of this year, said 10 detainees had been under lock and key for more than 10 months.

And they highlighted concerns that vulnerable people, including victims of alleged rape and torture, were being detained, despite a presumption such such people only be locked up in exceptional circumstances.

HMIP, however, also praised Dungavel's staff, saying relations with detainees were generally very good and that accommodation was generally reasonable.

Many of their criticisms were aimed at the UK's migration and asylum system rather than the local management of Dungavel, which is privatised and answered to the UK Home Office rather than Scottish authorities.

Their two main concerns and recommendations, meanwhile, related to the risks of holding women in a facility that was male-dominated and to failure to properly access whether vulnerable people, such as the alleged rape and torture victims, should be locked up.

Campaigners, including the Scottish Trades Union Congress (STUC), have long expressed concerns that the UK-ruled Dungavel regime was out of kilter with Scottish attitudes to both migration and incarceration. They want it closed - and replaced by what they see as a more human system for dealing with removals.

Grahame Smith, the STUC's general secretary, also highlighted the fate of vulnerable detainees and called for a review of night-time removals from the centre.

He added: "It is simply unacceptable that one person was detained for two and a half years and many more detained for over six months with little that staff can do to mitigate the mental anguish and damage to health that ensue.

"Our concern has always been that the individual experiences of the innocent people held at Dungavel could not be separated from the wider operation of the asylum system.

"The UK remains the only country in Europe which permits indefinite detention and it is simply impossible for any centre, supposedly designed for removal to adequately mitigate such a barbaric system."

The Home Office said it was pleased with the report's findings that Dungavel was "a safe place".

A spokesman said: "Detention and removal are essential parts of effective immigration controls, 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.

"It is used as a last resort and for the shortest period necessary. "Decisions to detain an individual are reviewed regularly to ensure they remains justified and reasonable - and, if necessary, can be challenged through the courts."

Westminster voted to keep indefinite detention of immigration offenders last year. A UK review of detainees' welfare, however, is currently underway. Led by former prisons ombudsman Stephen Shaw, it is due to report back after the summer.