MAYS LANDING, N.J. — Alvin Wyatt, 31, alleged to have fatally shot a 10-year-old boy at a crowded high school football game Nov. 15 in Pleasantville, was ordered to remain in custody Wednesday ahead of his trial on charges of murder and attempted murder.

Two other men charged in the shooting — which caused chaos during a playoff game between Pleasantville and Camden — also were ordered to remain in custody. Michael Mack, 27, and Tyrell Dorn, 28, are accused of leading police on an extended chase in a BMW after fleeing the game.

In his ruling to keep Wyatt in custody, Superior Court Judge Bernard DeLury admonished the Atlantic City native, saying his release would pose “a palpable threat to public safety.”

“This defendant’s conduct was exceedingly violent and dangerous,” DeLury said. “And he could’ve caused widespread harm.”

At the game, authorities say, Wyatt saw a rival in the bleachers and opened fire about 8:30 p.m., shooting three people and sending players and fans scrambling for safety.

The 10-year-old, Micah Tennant, sustained a gunshot wound to the neck and died days later at Cooper University Hospital in Camden. The boy’s family announced Wednesday that his funeral will be held Saturday morning at New Shiloh Baptist Church in Atlantic City.

Wyatt also is accused of firing shots that wounded a 15-year-old boy and the intended target, Ibn Abdullah of Atlantic City, who remains hospitalized and also has been charged.

Six men have been charged in the shooting: the three who appeared in court Thursday, plus Abdullah, 27; Vance Golden, 28; and Shahid Dixon, 27. Golden and Dixon remain in custody after hearings held last week.

In arguing for Wyatt to remain incarcerated, Atlantic County Chief Assistant Prosecutor Seth Levy stressed that Wyatt posed a significant risk of fleeing the area if released, and of intimidating witnesses who might testify against him.

“I can’t imagine a greater disregard to public safety, any greater disregard for human life, than firing into [the stands at] a crowded football game,” Levy said.

Levy also pointed to Wyatt’s criminal record: In March, Wyatt finished his parole on an unrelated criminal conviction from 2016. Prosecutors did not specify what the prior charge was.

Attorneys for Mack and Dorn argued that they had no involvement in the shooting allegedly committed by Wyatt, and should not be held accountable.

Mack’s attorney, Matthew Portella, said his client “was just there to attend the game, and when the shots rang out, he ran like everyone else.”

A similar argument was made by Dorn’s attorney, Michael Schreiber. Prosecutors allege that Dorn threw a 9mm handgun out of the window of the BMW he was riding in with the others as they were being chased by police officers. The gun was not connected to the shooting at the football game.

But Schreiber said his client did so because the firearm, which was in the vehicle when he got inside, wasn’t his, and he was afraid police would signal for them to stop. He contended that Dorn had been caught up in the “overflow” of public outrage from the shooting, a crime with which he had no connection.

DeLury disagreed, noting that both Dorn and Mack have a history of arrests, and ordered them to remain in custody ahead of their trials on eluding police and weapons offenses.