ATLANTIC CITY — On the sidelines of basketball courts, Gene Allen has paced and yelled and motioned and coached his Atlantic City High boys teams to 336 victories and three state titles in 15 years.

On Tuesday morning, Allen sat quietly, hands folded, inside a court of a different kind — Atlantic County Court, Civil Division — but a judge awarded him the same kind of decisive victory A.C. Vikings fans are used to.

“I’m just happy for an opportunity to coach the 2018-2019 season, that’s all,” Allen said outside the courtroom after the judge’s ruling. He said the team had a scrimmage Monday afternoon in Delran.

Superior Court Michael J. Blee, who had previously issued a temporary injunction reinstating Allen, said the Atlantic City Board of Education had not given Allen proper notice that it would be discussing terminating him as basketball coach at the Nov. 20 meeting.

Blee ruled the board violated Allen’s due process rights, operated in violation of the Open Public Meetings Act, and said its actions were not in compliance with the the terms of the teachers' contract, which also covers extra-curricular posts like coach.

The judge ruled that terminating Allen for the season would cause irreparable harm to him and the players he coaches and mentors, some of whom, the judge noted, may have passed on other noted basketball programs like Holy Spirit or St. Augustine Prep to play for the Vikings.

“By removing a coach in this point in the season when scrimmages have already begun, tryouts have started, the student athletes would be harmed,” Blee said in his ruling, delivered from the bench.

“Student athletes may have selected A.C.H.S to have the experience of playing for coach Allen, and have now learned at the beginning of the season that he’s no longer the coach,” Blee said. “The bond between student-athlete and coach is special.”

Although Allen never stated in writing by a March deadline that he wanted to return as coach, he had long given a verbal indication and had already begun holding tryouts when the board acted.

An email was sent to Allen the week before saying the position would be discussed, but also telling him not to be “alarmed.” The agenda said the superintendent was recommending he be reinstated.

“He had no reason to believe any adverse action would be taken,” said Blee, like Allen, a graduate of rival Holy Spirit High School. There was also no “box” to check whether he wanted any such discussion to be public or private, as is required by the state in letters informing teachers their school board will be discussing their employment.

In any case, Allen was in the Dominican Republic when the email was sent and never opened it, said his attorney, William Donio.

Allen declined to talk about the text messages he sent to last year’s team questioning whether the team deserved an elaborate banquet, text messages that included some profane language and whose tone led one parent to repeatedly attend school board meetings with a poster displaying the content from those texts.

He also declined to comment on the state of the Atlantic City High School gym, which has been out of commission since flooding last year but is expected to be back in service soon.

No school board members or current administration members attended the hearing. Tracy Riley, attorney for the board, said she would inform the board of the judge’s decision but did not know what if any further action it would take.

In a letter published Sunday in the Press of Atlantic City, board president Walter Johnson apologized for terminating Allen as coach and said he was not aware “that we were in the midst of basketball season and I failed to consider this.” He said he was trying to “finally resolve” the complaint against Allen, but now will “support the tutelage of Coach Allen and the Atlantic City boys basketball program.”

The judge said he would not consider the letter in his ruling, which consisted of voiding the board’s actions and issuing a permanent injunction to cover the 2018-2019 season.

Allen, who is also a teacher in the district, is widely regarded as the top coach in Atlantic City basketball history and one of the best coaches in the state. His teams have won 336 games, six South Jersey titles, and three state titles — the first three state crowns in program history — since 2003.

The team opens its season Dec. 14 against St. Joseph’s.