At least 20 failed asylum seekers with dependent children will be offered support in private flats rather than being held in the Dungavel detention centre.

The pilot scheme, aimed at encouraging families to return home voluntarily in a more humane and dignified way, will begin in Glasgow next month.

The £125,000 project will provide flats for about five families of asylum seekers at a time, and help them plan a return to their home country.

However, it will not remove the need for what the UK Border Agency describes as "enforced returns", and dawn raids - currently taking place at a rate of one a month - will still form part of their strategy in Scotland.

In its current format the three-year pilot will be able to cater for 20 families a year, but UKBA figures suggest that 40 families may be eligible and the controversial practice of sending children to Dungavel will be reduced but not ended.

In October, Jim Murphy, the Scottish Secretary, announced that from early next year up to four families at a time would be housed in ex-council flats in Glasgow before they were sent back to their countries of origin.

The pilot was welcomed as a "a step towards" ending the detention of children in the Dungavel centre in Lanarkshire, but campaigners have warned that the devil may be in the detail and it will need to be rigorously assessed.

The scheme, which involves Glasgow City Council, the UKBA and the Scottish Government, will offer failed asylum seekers with dependent children the option of spending up to three months in a flat in Kinning Park with a dedicated social worker and package of measures to ease their return.

The flats will be fully furnished and have satellite television and native language newspapers to help re-familiarise people with the countries they are returning to. Children should be allowed to stay on at their schools in other parts of the city.

It involves social work staff working with the families to help them face the "reality" of their position in Scotland.The aim is to reduce the need for enforced return of families whom the agency and the courts agree do not require international protection.

While there is already a system for helping refused asylum seekers who wish to return home voluntarily, this is said to be the first Scottish project to bring families together in designated accommodation to get dedicated help.

Phil Taylor, Regional Director of the UKBA, said it was far better for people to return home "under their own steam" rather than be forcibly removed.

"We only detain families as a last resort when they refuse to return home despite the courts confirming that they do not require protection," he said.

"This project is a small step along the way, and it is likely that some families who fail to return home voluntarily will still have to be detained and their departure enforced.

"However, we are all committed to making that number as small as we possibly can."

The practice of dawn raids in which families of failed asylum seekers are taken from their homes to Dungavel detention centre ahead of deportation has been regularly criticised.

Recent figures suggest that at least 19 children have been detained with their families in Dungavel this year.

While the Scottish Government has no authority to intervene in Dungavel, as asylum matters are reserved to Westminster, ministers and local councils are responsible for child welfare.

Following a surprise inspection at Dungavel last year, Chief Inspector of Prisons Anne Owers said: "The plight of detained children remains of great concern. An immigration removal centre can never be a suitable place for children."

Yesterday Fiona Hyslop, the Education Secretary, said: "Asylum seekers must be treated fairly and humanely. This is at the heart of this new innovative and exciting pilot in which Scotland will lead the way for the entire UK.

"The Scottish Government remains fundamentally opposed to the detention of children and dawn raids and considers that one child detained is one child too many."

Referring to the scheme, Scottish Secretary Jim Murphy said: "I think everyone across Scotland agrees, if there is a better way to treat families seeking asylum then we should look at those possibilities. The interests of children, regardless of their immigration status, have to be the first priority.

"This is a better way of doing things."