The United Kingdom Supreme Court has ruled that Shamima Begum, who left the UK to join the Islamic State party as a child, would not be allowed to return and contest her citizenship case.
In a unanimous decision, the court said that when she was denied permission to return, her rights were not violated, reports the BBC.
Ms Begum, 21, wants to come back to challenge the home secretary's decision to remove her British nationality.
She is in a camp controlled by armed guards in northern Syria.
Ms Begum was 15 when she and two other east London schoolgirls left the UK and travelled to Syria to join the Islamic State group in February 2015.
Two years ago, the then-Home Secretary Sajid Javid stripped Ms Begum of her citizenship on national security grounds.
Last July, the Court of Appeal ruled that the only fair way forward was to allow her into the UK because she could not effectively appeal against the decision from the camp in northern Syria.
The Home Office subsequently appealed to the Supreme Court to reconsider the Court of Appeal's judgement, arguing that allowing her to return to the UK "would create significant national security risks".
On Friday, Lord Reed, president of the Supreme Court, said the government had been entitled to prevent Ms Begum from returning to the UK.