The Home Secretary's decision to refuse British citizenship to family members of a failed asylum seeker assessed to be an Islamist extremist has been overturned by the High Court.
A judge ruled Theresa May acted unlawfully when she attempted to use the laws on naturalisation as a "deterrent" to other extremists.
Mrs May denied certificates of naturalisation to the wife and grown-up children of Egyptian national Hany El Sayed El Sabaei Youssef, who is listed by the UN Sanctions Committee as associated with al Qaida through Egyptian Islamic Jihad (EIJ).
Mr Justice Ouseley, sitting in London, ruled that Mrs May's decision had gone "beyond the scope and purpose" of the British Nationality Act 1981, which allows acquisition of citizenship through naturalisation.
The judge said Parliament had not "expressly provided" that citizenship could be refused to deter others "from engaging in extremism in the future".
The ruling was a victory for family members referred to as MM, GY and TY, who cannot be named for legal reasons.
Law firm Birnberg Peirce, which acted for the wife and children, welcomed the judge's ruling and said it was hoped all three would now be granted citizenship "without further delay, so that they may move forward with their family and professional lives".
The law firm said in a statement: "In the judgment of Mr Justice Ouseley, the discretion afforded to the Home Secretary by the 1981 Act was conferred by Parliament to further the statutory focus on the individual applicant for naturalisation, not for the pursuit of broad, general public policy objectives.
"Visiting the alleged 'sins of the father' on innocent family members, in pursuit of a policy of deterring 'potential future extremists', is neither fair nor rational."