(The Hill) – A federal judge on Thursday ordered Starbucks to reinstate seven employees at a Memphis store after finding the company illegally retaliated against them for helping organize a union.

U.S. District Court for the Western District of Tennessee Judge Sheryl Lipman told Starbucks it had five days to reinstate the employees, known as the “Memphis Seven,” whom the coffee chain said it fired on Feb. 8 for previously violating its safety policies, sparking a complaint from the National Labor Relations Board (NLRB).

“Today’s federal court decision ordering Starbucks to reinstate the seven unlawfully fired Starbucks workers in Memphis is a crucial step in ensuring that these workers, and all Starbucks workers, can freely exercise their right to join together to improve their working conditions and form a union,” NLRB General Counsel Jennifer Abruzzo said in a statement. 

“Starbucks, and other employers, should take note that the NLRB will continue to vigorously protect workers’ right to organize without interference from their employer,” she added.

Starbucks argued it fired the employees for breaking the companies’ policies on Jan. 18, including by going behind the counter while off-duty and unlocking a locked door to allow an unauthorized person to enter the store while off-duty. 

The terminations included five of the store’s six union organizing committee members and two others involved in the efforts.

On the day of the alleged policy infractions, employees said they passed out union authorization cards and sat down in the store with a television news crew about the union organizing efforts. The organizing committee had publicly posted a letter addressed to the company’s CEO about the union one day prior.

The NLRB argued Starbucks terminated the employees based on policies it did not consistently enforce, saying it was a pretext for the company’s opposition to the union.

We’re beyond thankful the federal court ruled in our favor, and this just goes to show that Starbucks will do everything in their power to silence us,” Nabretta Hardin, a lead organizer at the store who was terminated, said in a statement.

The judge also agreed with the NLRB’s allegations that Starbucks broke federal labor laws in the lead-up to the termination, which it said included violations ranging from increased monitoring from management during the organizing effort to removing pro-union literature from the store’s community bulletin board.

“We strongly disagree with the judge’s ruling in this case,” Starbucks said in a statement, adding that it planned to appeal and request a stay of the ruling to delay the reinstatements until after the review concludes.

“These individuals violated numerous policies and failed to maintain a secure work environment and safety standards,” the statement continued. “Interest in a union does not exempt partners from following policies that are in place to protect partners, our customers and the communities we serve.”

A Starbucks store in Buffalo became the first U.S. location to unionize in December. In court, employees at the Memphis store said they began organizing after hearing about the Buffalo unionization efforts.

The coffee chain has since seen dozens of additional stores seeking to unionize, with some organizing efforts leading to other lawsuits in localities across the country.

Starbucks on Monday asked the NLRB to temporarily suspend all union elections at its U.S. locations, citing allegations that regional NLRB offices improperly coordinated with union organizers.