A New York judge is forcing the N.F.L. to reveal something it has desperately tried to keep secret: how the league’s medical officials handled the issue of brain injuries over the last two decades.

On Monday, Justice Jeffrey K. Oing of New York State Supreme Court issued an order that will let insurance companies that wrote policies for the N.F.L. determine if the league knew about the dangers of concussions and deliberately concealed them from players. The issue is central to whether the insurers will pay for a class-action settlement brought by more than 5,000 retired players who accused the league of fraud and negligence because they were not told about the risks of repeated head hits.

The N.F.L. is likely to appeal Justice Oing’s ruling.

The settlement, which covers all retirees except for a few dozen players who have opted out, has been completed but is under appeal. The league has agreed to pay an unlimited amount of damages to players who have been found to have severe neurological conditions like Parkinson’s disease and Alzheimer’s disease, as well as pay for medical monitoring. Players can each receive up to $5 million, based on their condition, when it was diagnosed and how long they were in the league.