The first thing you see when you enter Valley Park Middle School is the flag of Afghanistan, one of 34 flags representing the students' countries of origin.

In the trophy case, banners celebrate the school's cricket triumphs. On the wall, the 2011 graduating class photos show eight pupils with the surname Khan, and about 20 per cent of girls wear the hijab. At least 80 per cent of the children are Muslim.

More than two-thirds of the population that surrounds Valley Park, in Toronto's northeast, have arrived in the past 20 years, primarily from India, Pakistan and more recently Afghanistan – reflecting Canada's shifting urban demographics.

Story continues below advertisement

The school draws many of its students from Thorncliffe Park, a one-kilometre horseshoe of apartment buildings packed with 30,000 people – a neighbourhood that is known for having the highest concentration of Muslims in Canada. Now it's becoming known for something else: It's at the centre of a growing debate over the place of religion in the public school system.

This week, a complaint about imam-led prayer sessions at the school has made unlikely allies of diverse religious interest groups and secularists, from the Canadian Hindu Advocacy to the Muslim Canadian Congress to the Canadian Secular Alliance.

When he arrived at Valley Park in 2007, principal Nick Stefanoff noticed that hundreds of Muslim students were signing out of school on Friday afternoons in November, when daylight savings pushed the time of congregational prayers into the school day. The local mosque is only 10 minutes away, but students would often disappear for hours.

Mr. Stefanoff revived a program used earlier in the decade, whereby a junior imam from the nearby Islamic Society of Toronto mosque would lead pupils in prayer in the cafeteria while afternoon classes were in session. Pupils who wanted to participate needed a permission slip signed by their parents and were responsible for making up the lessons they missed.

From November to March, the pupils enter the cafeteria segregated by sex, with boys at the front separated from girls at the back. The imam stands at the front with a microphone and begins with a short lesson in English, usually about the importance of discipline or mutual respect, said a parent volunteer, and then leads a prayer in Arabic.

Until a week ago, Valley Park's three-year policy of accommodating Muslim pupils who wanted to pray during school hours had caused barely a ripple. Then the Canadian Hindu Advocacy complained that it violated a policy banning religious instruction in public schools, which raised a chorus of opposition as well as support.

"We're doing something that's working," Mr. Stefanoff said. "No one in our community has complained. So why is this such a big deal? Of all the things we've accomplished, this is one I'm proudest of, and now I'm second-guessing myself. But it is right. I know it's right."

Story continues below advertisement

Human-rights laws oblige educators to accommodate students' religious beliefs, but accommodation is a vague term, and school boards across the province have evolved different ideas about what it means to accommodate religious beliefs.

The Greater Essex County District School Board, a Southern Ontario district with a large Muslim minority, allows senior students to lead prayer sessions, according to its diversity officer, Rachel Olivero.

At the Peel District School Board, west of Toronto, students are given a designated place to pray, but requests to have an imam lead the services have been denied.

"I think that accommodation is to allow for a place for them to be able to meet the requirements of their faith and to pray, not for that requirement to be led by a faith leader," said Brian Woodland, a spokesman for the board.

Yousuf Syed is a member of the parent council at Valley Park and a community leader in Thorncliffe Park whose son will attend the school in a few years. He said the pressure being exerted by what he described as Hindu fanatics made him nervous that the violent hatred he fled in India may flare in Canada.

"It would hurt if they shut down such a small request," he said. "Our children would think they have no human rights in Canada."

Story continues below advertisement

The neighbourhood attracts Muslim immigrants because they trust that their children will be able to grow up in a multicultural environment that respects Muslim practices, Mr. Syed said. There's a local Halal grocer, an abundance of Muslim neighbours, a nearby mosque and a school that allows prayer.

Sumaira Tariq, a teacher who immigrated from Pakistan a year ago, said those are the reasons she chose the Flemingdon Park area, not far away from Thorncliffe. She is a firm supporter of prayer at Valley Park school, where her son Mohammed is a student.

"It is essential for every Muslim to pray [on Friday afternoons] It is a great sin not to do so," she said. "It's good to pray at school. It's more powerful, and so other children will go to pray too."

Her son also takes part in religious education outside school by reading the Koran for 30 minutes every night. Mr. Stefanoff said that's quite common. Several hundred students at his school also attend daily religious education at the mosque.

But on Fridays, during the school day, about two-thirds of students choose class over organized prayers.

"Some people think prayer happens only at a certain time, I don't think so," said Riaz Qureshi, a physician whose son will be attending Valley Park in the fall.

Story continues below advertisement

Mr. Qureshi said he would leave it to his son to decide whether or not to miss class in order to pray.

Prayer gets its own subsection in the TDSB's religious accommodation policy, which states that "schools should make every reasonable effort to accommodate the requirement for daily prayer by providing an appropriate location within the building for prayer."

Ontario's Education Act forbids boards from allowing anyone to conduct religious services on school property (except at Roman Catholic schools), with some notable exceptions, including that they are not held during instructional time. In that sense, the Valley Park scenario doesn't seem to qualify as an exception.

The Ministry of Education didn't answer The Globe and Mail's query about whether or not Valley Park was breaking the law. In an e-mail, a spokeswoman wrote, "It would not be appropriate to speculate."