The Quebec Court of Appeal has ruled against turban-wearing Sikh truck drivers who sought an exemption from putting on the helmet required by their employers.

The province's highest court ruled Thursday that workplace safety must take precedence over temporary impacts on freedom of religion.

The three Sikh truck drivers had invoked their religious beliefs to challenge the requirement that they wear a hard hat when they have to leave their trucks at the Port of Montreal.

Their employers, three private trucking companies, said they adopted the helmet policy to protect the workers' health and safety, adding that it was required by law.

The workers first filed an application seeking an exemption in 2006, but it was refused in 2016 by Superior Court Justice André Prevost.

The Quebec Court of Appeal ruled that the Canadian Charter of Rights and Freedoms did not apply in the case because the helmet policy was dictated by private companies, not the state.

The Quebec Charter of Human Rights and Freedoms did apply, the court found, but it concluded the infringement of freedom of religion was justified by the helmet's safety benefits.