A judge from the National Labor Relations Board on Monday ruled that T-Mobile violated U.S. labor law at its locations in Maine and South Carolina when it had employees sign a confidentiality agreement after starting an internal investigation into employee complaints.

The Maine case involved a worker at the T-Mobile call center at FirstPark in Oakland who reported sexual harassment by her team coach in August 2014 and was asked to sign an agreement that she wouldn’t talk to anyone else about the case.

The employee, who worked at T-Mobile from 2006 to 2014, testified that she was told by a member of the human resources department that she could be subject to disciplinary procedures or lose her job if she spoke about the case. The employee subsequently resigned from her job.

Administrative Law Judge Joel Biblowitz in Washington, D.C., ruled that employees’ right to talk about disciplinary actions is protected under Section 7 of the National Labor Relations Act, and T-Mobile violated the act by restricting that right and then threatening disciplinary action against employees.

T-Mobile’s confidentiality rules infringed on the workers’ right to discuss “issues related to their terms and conditions of employment,” Biblowitz said.

The judge referred to a 2015 case in which the labor relations board similarly ruled that it was unlawful to prohibit workers from discussing workplace investigations. In that ruling, the board said discussions about disciplinary investigations were “vital to employees’ ability to aid one another in addressing employment terms and conditions with their employer. Accordingly, an employer may restrict these discussions only where the employer shows that it has a legitimate and substantial business justification that outweighs employees’ Section 7 rights.”

In his order, Biblowitz required T-Mobile to rescind its confidentiality requirement within 14 days and post a notice to employees at its Maine and South Carolina sites saying that it had violated national labor laws and inform them of their rights under the labor act.

In a statement released Thursday, T-Mobile spokeswoman Annie Garrigan called the ruling “puzzling, since T-Mobile’s approach to confidentiality is consistent with the National Labor Relations Board’s own investigation manual.”

“Best practices for maintaining the integrity of internal investigations include keeping the names of witnesses confidential and requiring witnesses to maintain confidentiality in order to ensure that information provided by subsequent witnesses is not tainted,” Garrigan added.

The company is considering whether to appeal Biblowitz’s decision. It has 28 days to file an appeal.