The government's tough line on asylum seekers could "fan the flame of the British National Party", a Scottish Labour MP has warned.
Dungavel is set to expand despite calls for its closure
Michael Connarty has criticised the Home Office over the detention of children at the Dungavel centre.
The centre in Lanarkshire houses failed asylum seekers and their families before they are deported.
The MP for Falkirk East said the government risked being seen as "xenophobic" because of its policies.
The Home Office, which is responsible for immigration policy, has repeatedly rejected calls to end the detention of asylum seekers' children.
Mr Connarty told the BBC's Good Morning Scotland that he believed there were "serious problems" within the Home Office.
"I think they think they are tackling the perception that they are soft on asylum seekers, by being hard on those who are the weakest," he said.
"I really worry that if we keep fanning this flame what we are actually going to fan is not a sense that Labour are tough because I notice that all the political parties, shamefully the Tories and SNP are trying to make political capital out of it.
"But really what we are doing is fanning the flame where people think that being anti-immigrant, anti-asylum seeker is a good thing and what we are generating is, aside from xenophobia... and actually we are fanning the flame of the British National Party if we keep doing this."
Speaking later, Mr Connarty added: "I believe it's encouraging people to think that any parties that are anti-immigrant are parties that they can trust."
The MP is involved in a campaign by churches in Scotland to stop the detention of children at Dungavel.
They have put forward a proposal which would allow children to be released after five days into hostel-type accommodation.
Whilst maintaining its stance, the Home Office has announced a series of measures to ensure the welfare of children at Dungavel.
These include the need for a government minister to give express authority before a child can be detained for longer than 28 days.
The educational and welfare needs of any child being kept there for more than three weeks will also be assessed to make sure they are being met.
Teachers' union call
Scotland's largest teachers' union, the EIS, are demanding an end to the detention of children at Dungavel.
The union said the practice of locking up innocent children with their families was a "mark of shame" on Scotland.
EIS general secretary Ronnie Smith said: "These children have committed no offence but just have the misfortune to be asylum seekers.
"It is unacceptable that children should be imprisoned in any circumstance.
The centre was a prison before housing asylum seekers
"They've been denied access to the education available to other youngsters
and barred from the opportunity to socialise and mix."
A Home Office spokesman responded: "It is clearly very regrettable that some families with children have to be detained. It is not a decision we take lightly.
"Obviously it is not ideal for any child to be detained. It happens in only a small number of cases for the minimum amount of time."
On Tuesday, Home Office minister Beverley Hughes revealed that Dungavel is to be expanded to house more asylum seekers and their families.
The proposals will increase Dungavel's capacity by 25% with the construction of a new 44-bed unit on the site.
The new block will cost £3m and consist of pre-fabricated buildings with bars on the windows.
The centre currently holds 150 men, women and children.