A German federal court was to rule on Wednesday whether a Muslim pupil has the right to pray according to Islamic rites in school, capping a more than two-year legal battle.
The 18-year-old pupil, identified only as Yunus M, insisted on his basic right to religious freedom but school authorities argued the practice endangered the smooth running of the state high school.
With about four million Muslims living in Germany, the case has sparked interest after two earlier regional court rulings first found in favour of the boy, only then to be overturned.
It began when the pupil, aged 16 at the time and the son of a German Muslim convert, and several other pupils laid down their jackets in the school corridor to pray during a break from class.
The principal informed the boy and his parents that praying was not permitted in the grounds of the Berlin high school which has students of about 30 different nationalities and nearly all major religions.
She feared for the peaceful running of the school, she said.
Yunus M has argued that because prayer times depend on the rising and setting of the sun, he has no other choice during the winter but to pray around midday while at school.
German news weekly Der Spiegel said that the consequences of Wednesday's ruling by the Leipzig-based federal administrative court would be closely watched nationwide.
"Since Yunus M kicked off a process which could write legal history," it said in its online edition.
Tilman Nagel, an expert in Islam who appeared as a witness at an earlier court hearing, said that postponing midday prayers was considered normal if there was a good reason.
He also argued that the Islamic ritual of praying undertaken with other people was very different to the Christian private act of praying, and was thus disruptive in a public space.
Germany has grappled with the thorny issue of the integration of its Muslim population since it signed a "guest worker" pact with Turkey 50 years ago.
This has sometimes fuelled tensions, with a former central banker publishing a runaway bestseller last year saying Germany was being made "more stupid" by four million purportedly undereducated and unproductive Muslim migrants.