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 earlier this year that the three teenagers and 26-year-old man should be brought immediately to Britain and reunited with their families living in the UK.

Lawyers for the refugees had argued that the boys faced "intolerable" conditions in the camp and their Article 8 right to a family life would be upheld by bringing them to 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.

Under a law called the Dublin Regulation, 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.

Lawyers for the four in this case had argued that the regulation was not working as not a single child had been brought to the UK from the Calais camp under the rule before the case had been brought.

They also argued that it would take up to a year for them to be brought to Britain under the regulation because of bureaucratic failings in France.

Handing down their judgement, Court of Appeal judges Lord Justice Moore-Bick, Lord Justice Longmore and Lord Justice Beatson ruled in favour of the Home Office appeal. However, as the four have already been brought to the UK they will not face deportation.

The judges said they "allowed" the Home Office's appeal in the case. The ruling stated that bypassing the Dublin III Regulation "can only be justified in an especially compelling case".

It went on: "In the light of the psychiatric evidence before the Upper Tribunal about the first four respondents and the evidence of the French lawyers and NGOs adduced by the respondents suggesting that there would be a delay of just under one year in the French system and that there was no possibility of expedition, the result the tribunal reached may have been justifiable.

"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."