A federal district court judge on Wednesday gave her final approval to the settlement of a lawsuit brought by more than 5,000 former players who accused the N.F.L. of hiding from them the dangers of concussions, a major step toward ending one of the most contentious legal battles in league history.

The settlement provides payments of up to $5 million to players who have one of a handful of severe neurological disorders, medical monitoring for all players to determine if they qualify for a payment and $10 million for education about concussions.

The landmark deal, which many players criticized, was originally reached in August 2013, but Judge Anita B. Brody twice asked the two sides to revise their agreement, first to uncap the total amount of damages that could be paid for the conditions covered, and then to remove the limit on how much could be spent on medical monitoring.

As part of the deal, the N.F.L. insisted that all retired players — not just the 5,000 or so who sued the league — be covered by the settlement as a way to fend off lawsuits in the future. But about 200 players, including Junior Seau, who committed suicide and was later found to have a degenerative brain disease, opted out of the settlement to preserve their right to continue fighting the league.