A 16-year-old girl has gone to the High Court to accuse her school of discriminating against Christians by banning the wearing of "purity rings".
Lydia Playfoot was told by Millais School in Horsham, West Sussex, to remove her ring, which symbolises chastity, or face expulsion.
The school denies breaching her human rights, insisting the ring is not an essential part of the Christian faith.
On Friday, judgement in the case was reserved to a future date.
Miss Playfoot says Sikh and Muslim pupils can wear bangles and headscarves in class.
BBC News religious affairs correspondent Robert Piggott said a group of girls at the school were wearing the rings as part of a movement called the "Silver Ring Thing" (SRT).
Human rights barrister Paul Diamond told the High Court the school's action was "forbidden" by law.
"Secular authorities and institutions cannot be arbiters of religious faith," Mr Diamond said.
He said a question the judge would have to answer was: "What are the religious rights of schoolchildren in the school context?"
Originating in America, SRT promotes abstinence among young people.
Our correspondent said it was now spreading to the UK as part of a wider protest by traditionalist Christians against what they see as the secularisation of society.
The rings are inscribed with a reference to the biblical verse I Thessalonians 4:3-4, which translates as: "God wants you to be holy, so you should keep clear of all sexual sin. Then each of you will control your body and live in holiness and honour."
Miss Playfoot's school said her ring broke uniform rules and ordered her to remove it.
When she refused, she was taken out of lessons and made to study on her own.
She told BBC Breakfast: "In the Bible it says you should remain sexually pure and I think this is a way I want to express my faith."
Miss Playfoot is seeking a judicial review under Article Nine of the Human Rights Act which guarantees freedom of religious expression.
She says that should protect her right to wear the ring.
In a written statement to Deputy Judge Michael Supperstone QC, Miss Playfoot said young girls faced a "moral and ethical crisis" and that other teenage girls at her school had become pregnant.
She said other pupils regularly broke the uniform code with nose rings, tongue studs, badges and dyed hair.
The only reason for banning the rings was because the school refused to "give respect to aspects of the Christian faith they are not familiar with", Miss Playfoot said.
"The real reason for the extreme hostility to the wearing of the SRT purity ring is the dislike of the message of sexual restraint which is counter cultural and contrary to societal and governmental policy," she added.
But headteacher Leon Nettley, said the school was applying a basic uniform policy, which "has the overwhelming support of pupils and parents".
He said her ring was "not a Christian symbol, and is not required to be worn by any branch within Christianity", adding that Lydia was free to display her faith in other ways.
Lawyers for the school will insist that it is not operating a discriminatory policy because allowances made for Sikhs and Muslims only occur for items integral to their religious beliefs.
It argues that a Christian pupil would be allowed to wear a crucifix.
In freely choosing the school, lawyers will also say that Miss Playfoot and her parents voluntarily accepted to adhere to the uniform code.
Miss Playfoot's first application to the High Court was turned down last year, but judges agreed to hear it after she appealed.
Miss Playfoot completed her GCSEs last week and has now left the school.
But her father Phil, who is a pastor, said she wanted to pursue the case because of its wider significance for all Christians.
"I think there's something bigger at stake here," he said.
Messages of support
Mr Playfoot and his wife Heather are part of the volunteer team which runs the UK branch of the Silver Ring Thing from their church in Horsham.
The organisers of the movement say as many as 25,000 young people have joined so far in the UK and that numbers are growing.
Miss Playfoot has received messages of support from politicians, including former Conservative party chairman Lord Tebbit and Tory MP Ann Widdecombe.
She also has the backing of the Lawyers Christian Fellowship (LCF) which represents 2,000 Christian lawyers across the UK.
The case is being funded through individual donations gathered through the LCF's sister group Christian Concern for our Nation.