A mandatory ethics and religion course in Quebec schools is constitutional, Canada's top court ruled Friday.

The Supreme Court of Canada ruled unanimously the course doesn't violate freedom of religion protections.

The case came before the court after a Quebec couple from Drummondville argued their children should be exempt from having to take the course, which the government introduced in 2008.

The couple said the course violated their rights by forcing their children to learn religious beliefs they didn't practice.

"The early exposure of children to realities that differ from those in their immediate family environment is a fact of life in society," the court said.

"The suggestion that exposing children to a variety of religious facts in itself infringes their religious freedom or that of their parents amounts to a rejection of the multicultural reality of Canadian society and ignores the Quebec government's obligations with regard to public education."

The court said the couple failed to prove their rights were violated by either the course or the school board's refusal to exempt the children from the program.

The ethics and religious culture curriculum replaced the former Protestant and Catholic religious courses for all students except those in Grade 9.

The government promoted it as a way of fostering harmonious relations among students by introducing them to religious practices and traditions from around the world as well as from Quebec.

The case came before the Supreme Court after a Quebec Superior Court and the Quebec Court of Appeal rejected the parents' arguments.