Three years after a gunman opened fire at a country music festival, the victims and their families will get restitution. A judge has approved an $800 million settlement, ending a class action lawsuit.

The settlement was announced in 2019, with 2,500 people said to be part of the lawsuit. CNN updates that number to more than 4,000. The judge approved the settlement on Wednesday (Sept. 30), one day before the three-year anniversary of the shooting at the Route 91 Harvest Festival. The money will be split up after a 30-day period to allow for appeals.

Fifty-eight people were killed when the gunman opened fire from the Mandalay Bay Resort and Casino, which was across the street from the festival. Jason Aldean was on stage at the time, and when fans realized shots were being fired, chaos ensued. Hundreds were injured by bullets as they tried to escape or take cover. Those killed ranged in age and came from all over the country and Canada. No motive was ever found for the shooting, and the gunman was found dead in his hotel room.

A portion of the settlement will come from the Mandalay Bay, but the majority — more than $750 million — will come from liability insurance. Plaintiff attorney Robert Eglet tells CNN that, "We are hopeful it will be completed in a manner that we will be able to disperse the victims' funds before the end of the year." Two retired judges agreed upon by both sides will decide how the money is dispersed.