The decision to revoke the British citizenship of Shamima Begum - one of three east London schoolgirls who travelled to Syria to join so-called Islamic State - has exposed her to a "real risk" of torture or death, a court has heard.
Ms Begum, now 20, left the UK in February 2015 and lived under IS rule for more than three years. She was found, nine months pregnant, in a Syrian refugee camp in February this year.
Former home secretary Sajid Javid stripped her of her British citizenship, a decision her lawyers argue was unlawful as it rendered her stateless. Such a decision is lawful only if an individual is entitled to citizenship of another country.
Ms Begum is bringing proceedings against the Home Office before the High Court and the Special Immigration Appeals Commission, a specialist court which hears challenges to decisions to remove someone's British citizenship on national security grounds.
At the start of a four-day preliminary hearing in London on Tuesday, Tom Hickman QC told Mrs Justice Elisabeth Laing that the situation in the al-Roj camp in which Ms Begum is currently being held is "incredibly fragile and dangerous".
In written submissions, he described conditions at the camp, where Ms Begum's third child died in March, as "wretched and squalid", adding that "the tragic death of the appellant's infant child ... demonstrates that fact".
The court is being asked to determine "whether the deprivation decision rendered the applicant stateless". The Home Office says the decision does not.
But Mr Hickman said Ms Begum - who is of British-Bangladeshi heritage - "is not considered a national of Bangladesh and was therefore rendered stateless by the deprivation decision".
He submitted that the Bangladeshi courts "would determine that the appellant did not automatically acquire Bangladeshi citizenship having been born outside Bangladesh as a UK citizen by birth".
He referred to evidence from an expert in Bangladeshi law, who says that it is "nearly impossible that any court in Bangladesh would rule against the government", which has publicly denied Ms Begum is a citizen of Bangladesh.
Mr Hickman said the court also had to decide "whether the deprivation decision gave rise to a real risk of death or degrading and inhuman treatment".
He submitted that conditions in al-Roj - and in the al-Hawl camp from which Ms Begum was moved for her own safety in February - breached Ms Begum's human rights.
Mr Hickman added that the decision "had the effect - and was designed - to prevent" Ms Begum from return to the UK, leaving her "abandoned" in a detention camp.
This, he added, meant Ms Begum "cannot have a fair and effective appeal" as she is unable to speak confidentially with her lawyers or to give evidence in support of her appeal.
Mr Hickman said SIAC "will not be considering the national security case against the appellant or the proportionality of the decision to deprive her of citizenship".
In his written case, the Home Office's barrister, Jonathan Glasson QC, argued that Ms Begum "was a Bangladeshi citizen by descent, in accordance with Bangladeshi law, and so was not rendered stateless by the deprivation decision".
He also submitted that Ms Begum "has not been placed at risk of ill-treatment" as a result of the decision to revoke her British citizenship.
"Any risk that the appellant does face arose, and continues to persist, as the result of the appellant having travelled to Syria and aligned with (IS) and is wholly unrelated to the deprivation decision," he added.
Ms Begum, then aged 15, was one of three schoolgirls from Bethnal Green Academy who left their homes and families to join IS, shortly after Sharmeena Begum - who is no relation - travelled to Syria in December 2014.
Kadiza Sultana and Amira Abase, then 16 and 15 respectively, and Ms Begum boarded a flight from Gatwick Airport to Istanbul, Turkey, on February 17 2015, before making their way to Raqqa in Syria.
Ms Begum claims she married Dutch convert Yago Riedijk 10 days after arriving in IS territory, with all three of her schoolfriends also reportedly marrying foreign IS fighters.