MEMPHIS, TENN. -- A federal judge is ordering Starbucks to reinstate seven employees in Memphis who were fired earlier this year after leading an effort to unionize their store.

In a decision issued Thursday, U.S. District Judge Sheryl Lipman agreed with the National Labor Relations Board, which had asked the court to intervene in May. The labor board said Starbucks violated U.S. labor law by interfering in workers' right to organize.

Lipman's decision requires Starbucks to offer to reinstate the employees within five days. Starbucks will also be required to post the court order in the Memphis store.

Starbucks said Thursday it strongly disagrees with the court order and will appeal. It will also request a stay of the opinion, which would delay the reinstatement of the employees while the appeal is considered.

The case has been among the most closely watched in the unionization effort at Starbucks. Since late last year, more than 220 U.S. Starbucks stores -- including the Memphis store -- have voted to unionize. Starbucks opposes the unionization effort.

Starbucks fired the seven employees in early February, citing safety. The Seattle coffee giant said the employees violated company policy by reopening a store after closing time and inviting non-employees -- including a television crew -- to come inside and move throughout the store.

"These individuals violated numerous policies and failed to maintain a secure work environment and safety standards," the company said in a statement Thursday. "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."

But the NLRB and the fired workers told the court that Starbucks had routinely tolerated off-duty employees and non-employees remaining in the store after hours to make drinks, collect belongings or assist each other.

"Such tolerance before union activity, but terminations resulting thereafter, supports an inference of discriminatory motive," the judge wrote.

The NLRB had begun administrative proceedings against Starbucks, saying the company was unlawfully interfering in workers' right to organize. But those proceedings can take so long that the NLRB asked the federal court for an immediate injunction requiring Starbucks to reinstate the workers.

"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," the labor board's 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."

One of the workers, Beto Sanchez, said he and his colleagues have suffered financial distress since they were fired, and he has had to work several jobs. Sanchez said he was so surprised after receiving a text about the favorable ruling that he dropped his phone.

"We've had a lot of tough moments, but we kept fighting each day," Sanchez said. "It feels like all the hard work has paid off during all those months, and we're just really happy."

The NLRB has filed a separate federal court case in New York seeking the reinstatement of seven pro-union workers who were fired from a store in Buffalo. A decision in that case is pending.

The agency lost a similar case in Arizona in June, when a federal judge declined to order Starbucks to reinstate three workers.

------

Durbin reported from Detroit.