A woman who travelled to Syria to join the so-called Islamic State as a teenager cannot return to the UK to appeal against the removal of her British citizenship, the UK Supreme Court has ruled.
Shamima Begum was 15 when she and two other east London schoolgirls travelled to Syria to join the Islamic State militant group in February 2015.
Her British citizenship was revoked on national security grounds shortly after she was found, nine months' pregnant, in a Syrian refugee camp in February 2019.
Ms Begum, now 21, is challenging the Home Office's decision to remove her British citizenship and wants to be allowed to return to the UK to pursue her appeal.
In July last year, the Court of Appeal ruled that "the only way in which she can have a fair and effective appeal is to be permitted to come into the United Kingdom to pursue her appeal".
The Home Office challenged that decision at the Supreme Court in November, arguing that allowing her to return to the UK "would create significant national security risks" and expose the public to "an increased risk of terrorism".
The UK's highest court ruled that Ms Begum should not be granted leave to enter the UK to pursue her appeal against the deprivation of her British citizenship.
Announcing the decision, Lord Reed said: "The Supreme Court unanimously allows all of the Home Secretary's appeals and dismisses Ms Begum's cross-appeal."
"The right to a fair hearing does not trump all other considerations, such as the safety of the public," Lord Reed said.
"If a vital public interest makes it impossible for a case to be fairly heard then the courts cannot ordinarily hear it.
"The appropriate response to the problem in the present case is for the deprivation hearing to be stayed - or postponed - until Ms Begum is in a position to play an effective part in it without the safety of the public being compromised.
"That is not a perfect solution, as it is not known how long it may be before that is possible.
"But there is no perfect solution to a dilemma of the present kind."
The Supreme Court unanimously held that the Court of Appeal was wrong to find that Ms Begum should be allowed to enter the UK to pursue her appeal against the removal of her British citizenship.
Lord Reed said the Court of Appeal wrongly "made its own assessment of the requirements of national security and preferred it to that of the Secretary of State, despite the absence of any relevant evidence before it".
The judge added: "The Court of Appeal's approach did not give the Secretary of State's assessment the respect which it should have received, given that it is the Secretary of State who has been charged by Parliament with responsibility for making such assessments, and who is democratically accountable to Parliament for the discharge of that responsibility."
In the Supreme Court's written ruling, he said: "It is, of course, true that a deprivation decision may have serious consequences for the person in question: although she cannot be rendered stateless, the loss of her British citizenship may nevertheless have a profound effect upon her life, especially where her alternative nationality is one with which she has little real connection.
"But the setting aside of the decision may also have serious consequences for the public interest.
"In such a case, it would be irresponsible for the court to allow the appeal without any regard to the interests of national security which prompted the decision in question, and it is difficult to conceive that the law would require it to do so."
Downing Street said it was "pleased" with the decision by the Supreme Court.
A spokesman for Prime Minister Boris Johnson told reporters: "We are obviously pleased with the Supreme Court's unanimous decision.
"As we've said before, the Government's priority is maintaining our national security.
"Decisions to deprive individuals of their citizenship are not taken lightly.
"We'll always ensure the safety and security of the UK, and will not allow anything to jeopardise this."
Pressed on Conservative MPs' concerns the decision created a security risk for the UK, the spokesman said it would not comment on individual cases.