In a case which echoes this year's passionate French debate over religious clothing, Shabina Begum claimed her school had wrongly refused to allow her to wear an ankle-length jalbab, which covers the entire body except for the hands and face.
Begum argued at the High Court that her education was suffering and her human rights were breached as a result.
But in a ruling which sparked anger among Muslim groups, the judge on Tuesday dismissed her case, saying she had always had the option of attending school in clothes under school rules.
"It seems to me very unrealistic and artificial to say that the claimant's right to education has been denied," said Justice Bennett.
Muslim organisations condemned the judgement as "extremely worrying" and urged Begum to appeal.
"The Muslim community is a diverse community in terms of the interpretation of its faith and its practice. Within that broad spectrum, those who choose to wear the jilbab and consider it to be part of the faith's requirement for modest attire should be respected," said Muslim Council of Britain (MCB) spokesman Inayat Bunglawala said.
Around 80% of the 1,000 pupils at Denbigh High School are Muslim. The school argued in court that it already operated a flexible school-uniform policy.
"The Muslim community is a diverse community
in terms of the interpretation of its faith and its practice"
spokesman, Muslim Council of Britain
The school said the jilbab posed health and safety risks, an argument rejected by the MCB as "highly spurious".
"Many other schools have willingly accommodated Muslim schoolgirls wearing the jilbab," Bunglawala said.
Begum's lawyer Yvonne Spencer told the court it had been "impossible for her to attend the school because she is not allowed to attend wearing her religious dress" .
But the judge said the girl had gone to school happily for two years before she "abruptly ... changed her beliefs" and refused to attend unless she would wear a jilbab.
France recently banned wearing
of headscarves in schools
"The claimant refused because she felt compelled by her religious beliefs. It was at all times open to her to change her mind ... and return to school," he said.
Begum started at the school in Luton, north of London, in September 2000, and at first wore a salwar kameez - consisting of trousers and a tunic - which school rules allowed.
But as her interest in Islam deepened, she returned after the summer break in September 2002 wearing the jilbab and was ordered to go home and change. She has been back to the school only once since then, to sit for an exam.
Muslim groups are already unhappy with Britain's education system, which they have branded Islamophobic as they called for Britain's 300,000 Muslim children to be offered exclusive Muslim schools and more single-sex teaching.
The debate mirrors that in France, where a ban passed in March on Muslim headscarves, Jewish skullcaps and large Christian crosses being worn in schools sparked a bitter row.