NEW YORK (AP) — New England Patriots quarterback Tom Brady can suit up for his team’s season opener after a judge erased his four-game suspension for “Deflategate.”

NFL Commissioner Roger Goodell said the league will appeal the decision.

The surprise ruling by U.S. District Judge Richard Berman came Thursday after more than one month of failed settlement talks between the NFL and its players’ union. Many legal experts believed the judge was merely pressuring the sides to settle when he criticized the NFL’s handling of the case at two hearings in August.

But the judge wasn’t posturing.

He came out forcefully in Brady’s favor, maligning the NFL for its handling of the scandal that erupted after the AFC championship game in January, when officials discovered during the first half that Brady used underinflated footballs. New England beat the Indianapolis Colts 45-7 then won the Super Bowl two weeks later.

An NFL investigation led to Brady’s suspension, which Goodell upheld.

Berman’s ruling Thursday focused on three key areas:

The NFL and Goodell gave inadequate notice of discipline and misconduct

Goodell didn’t allow Brady and his attorneys to examine Jeff Pash, the co-leader investigation into the deflated football case

Goodell improperly denied Brady equal access to investigative files

Berman wrote Goodell “may be said to have dispensed his own brand of industrial justice” when he determined Brady’s four-game suspension and then upheld it on Brady’s subsequent appeal. The judge took issue with the way the NFL handled the matter and questioned the “independent” nature of the Ted Wells report that said Brady was “generally aware” that the Patriots were tampering with footballs.

Goodell released a statement saying he “respectfully” disagreed with Berman’s decision:

We are grateful to Judge Berman for hearing this matter, but respectfully disagree with today’s decision. We will appeal today’s ruling in order to uphold the collectively bargained responsibility to protect the integrity of the game.

The commissioner’s responsibility to secure the competitive fairness of our game is a paramount principle, and the league and our 32 clubs will continue to pursue a path to that end.

While the legal phase of this process continues, we look forward to focusing on football and the opening of the regular season.

The NFLPA released the following statement about the ruling:

The rights of Tom Brady and of all NFL players under the collective bargaining agreement were affirmed today by a Federal Judge in a court of the NFL’s choosing. We thank Judge Berman for his time, careful consideration of the issue and fair and just result.

This decision should prove, once and for all, that our Collective Bargaining Agreement does not grant this Commissioner the authority to be unfair, arbitrary and misleading. While the CBA grants the person who occupies the position of Commissioner the ability to judiciously and fairly exercise the designated power of that position, the union did not agree to attempts to unfairly, illegally exercise that power, contrary to what the NFL has repeatedly and wrongfully claimed.

We are happy for the victory of the rule of law for our players and our fans. This court’s decision to overturn the NFL Commissioner again should signal to every NFL owner that collective bargaining is better than legal losses. Collective bargaining is a much better process that will lead to far better results.