A federal tribunal has ruled that the Canada Border Services Agency cannot force its border agents to wear name tags.

The Occupational Health and Safety Tribunal of Canada says the CBSA contravened Canada’s Labour Code in making name tags mandatory.

The CBSA implemented the name tag policy in December 2012.

"The employer has failed to take preventive measures to address the assessed hazard associated with the implementation of the new name tag policy into various workplaces nationwide," the tribunal's Pierre Hamel wrote in his ruling.

The CBSA must "take steps to ensure that the contravention does not continue or reoccur."

The ruling was posted to the tribunal's website July 3.

Jason McMichael, first national vice-president of the Customs and Immigration Union, declined to comment Monday afternoon.

He said he wanted to speak to CBSA management before speaking to the media.

In an email to CBC News, CBSA spokesperson Patrizia Giolti said the agency wouldn't comment until it had thoroughly reviewed the decision.

The name tag policy was designed to modernize the CBSA uniform and "reflect our commitment to service excellence and reinforce the professionalism and integrity," the CBSA said in 2012.

"We believe that this small step will allow the millions of clients we serve to feel more comfortable in their interactions with our officers," the CBSA said in a media release at the time. "Personalized name tags reflect our commitment to service excellence and reinforce the professionalism and integrity for which CBSA officers are known."

However, the Customs and Immigration Union, which represents those employees, opposed the change. It said identifying officers puts them in danger.

"CIU believes that wearing name tags exposes our members to unnecessary risks," union president Jean-Pierre Fortin said in a statement when the name tags were introduced.

Several work refusals took place across Canada immediately following the implementation of the name tag policy.

CIU Local 0018 Windsor district branch president Ace Essex previously told CBC News some front-line border agents are so concerned for their safety they have started using pseudonyms on Facebook so they can't be found online.