The Home Office has won its appeal against a landmark ruling allowing four Syrian refugees living in the "Jungle" camp in Calais to come to Britain.
An immigration judge ruled in January that the three teenagers and 26-year-old man with mental health problems should be brought immediately to the UK and reunited with their families.
But while the Home Office is not seeking to deport the four Syrians, it appealed against the ruling because it feared it could set a legal precedent and undermine Britain's control over its borders.
All four have been reunited with their families in various parts of the UK, two of them have been granted refugee status in Britain while the other two are still waiting for a decision to be made.
George Gabriel from Citizens UK, the charity that has represented the children, warned the ruling will lead to further delays and refugee children will be driven into the hands of people smugglers.
Under a law called Dublin III, asylum claims must be made in the first country the person reaches, but a child refugee can have their claim transferred to another country if they have relatives lawfully living there.
But lawyers for the Syrians argued the regulation was not working as not a single child had been brought to the UK from the Calais camp under the rule because of bureaucratic failings in France.
They demanded the British courts intervene to bring the four to Britain immediately, arguing that they faced "intolerable" conditions in the camp and they had an entitlement under the Article 8 right to a family life to be reunited with family in the UK.
The four Syrians were immediately brought to Britain and the decision was hailed by campaigners as a landmark ruling that could pave the way for many other unaccompanied minors to come to the UK from refugee camps in Europe.
But three Court of Appeal judges on Tuesday ruled in favour of the Home Office appeal against the ruling.
Criticising the decision, Mr Gabriel said: "When we brought this case, it was an enormous kick up the arse for the Government, and the system is now working better because 50 children have been brought to Britain since the case.
"But it means that charities like ours will have to continue identifying children one by one, taking them through a lengthy bureaucratic process as they have to wait to be reunited with their loved ones.
"Today is a great day for bureaucrats because it means that the letter of the process will have to be followed despite the clearly unacceptable wait this leaves refugee children facing.
"We fear this means many will take the situation into their own hands, choosing between people traffickers on the one hand and train tracks on the other."
Handing down their judgment, Court of Appeal judges Lord Justice Moore-Bick, Lord Justice Longmore and Lord Justice Beatson stated that bypassing the Dublin III Regulation "can only be justified in an especially compelling case".
It stated that given the evidence of the psychological trauma the four had experienced and testimony warning that their claims could take just under a year to process "the result the tribunal reached may have been justifiable".
But it added: "I am, however, not entirely persuaded that, had the tribunal applied the correct test, it must inevitably have reached the same conclusion.
"In those circumstances, the appropriate course would normally have been to remit the matter to the tribunal for reconsideration.
"However...I have concluded that it would be inappropriate to take that course. I would therefore simply allow the appeal and make no further order."
The ruling said the Home Office had sought the appeal not in order to deport the four Syrians, but to overturn it because of the legal repercussions it could usher in.
It stated that a barrister acting for the Home Office explained that "the appeal was necessary because the approach of the Upper Tribunal has potentially far-reaching and serious consequences for the ability of the United Kingdom to control its borders and for the integrity of the Dublin III system".
The Home Office argued that the asylum claims should have been made in France and that, under Dublin III, they could then have been handed over to Britain.
The Bishop of Barking, Peter Hill, a spokesman for Citizens UK, said they are "disappointed" with the result which will leave refugee children relying on volunteers to help them come to Britain.
He said: "Citizens UK is calling on the Home Office to establish a functional system for identifying refugee children with potential claims to family reunification in the UK. At the current rate of reunification it will take a year before all the children in Calais are reunited with their families. This is forcing children to take matters into their own hands, stowing away in lorries or vans.
"We know of two boys who have died in the last 12 months trying to reach their families in the UK.
"The Government has a legal and a moral responsibility to ensure that refugee children who have close family members in the UK are granted safe passage."
Bella Sankey, policy director for rights organisation Liberty, said: "Government may have won in court today but what an empty and Pyrrhic victory. Home Office intransigence on reuniting vulnerable refugee children with family members already in our country forces them into the hands of traffickers and ruins lives.
"We have the capacity to provide them with safety and a childhood with their own families. It is deeply un-British to use public funds to instead shut the door on them and leave them languishing in 'a living hell' on our doorstep."
Liberal Democrat leader Tim Farron said: "It is disgusting that the Government is putting ideology above what is best for desperate and vulnerable children.
"These kids have already been through what no child should have to, and there is absolutely no doubt that what is best for them is to be with their family, here in the UK. Not only that, but we were given a pledge to take more refugee children which the Government has broken."
A Home Office spokesman said: "We welcome the decision of the Court of Appeal to recognise the principle that those seeking protection should claim asylum in the first safe country they reach.
"Any request to unite family members under the Dublin Regulation is carefully considered. Where someone seeking asylum elsewhere in the EU can demonstrate they have close family members legally in the UK, we will take responsibility for that claim."
He said more than 30 children have been accepted for transfer to the UK under the new Immigration Act and that over 100 children have been accepted under the Dublin regulations since the start of the year.
Labour MP Yvette Cooper, chairwoman of the Refugee Taskforce, said: "I am appalled that Theresa May has pursued this appeal to make it harder for vulnerable child refugees who are alone in Europe to join family in Britain.
"These children's lives and safety are at risk as they have no one to look after them. The result of this appeal is to put extra bureaucratic obstacles in the way of lone child refugees who are desperately vulnerable to trafficking, slavery and abuse - even though they have relatives who could care for them here.
"After the Dubs amendment the Government should be making it easier for Britain to do its bit to take lone child refugees. Instead they are doing the opposite and forcing children to wait longer in danger when they could be safe.
"By pursuing this appeal the Government is turning its back on the small number of vulnerable child refugees who could have been offered safe haven quickly with relatives in Britain.
"Theresa May personally made the decision to pursue this appeal - and it is a complete disgrace that a British prime minister should behave in this way.
"Her claim to be personally tackling modern slavery is utter hypocrisy when she is forcing these children into even greater risk of slavery, exploitation and abuse. She should immediately act to ensure child refugees with relatives in Britain have a fast, safe route to the UK."