An upstate judge on Thursday apparently put an end to the effort by the current school board in Massapequa to abandon the plan by its predecessor to relocate district sixth-graders to Berner Middle School.

Sitting in Albany County, Supreme Court Judge Denise Hartman upheld the State Education Commissioner’s stay of the school board’s July vote to cancel those plans. District lawyers had argued that Commissioner MaryEllen Elia “abused her discretion in this matter.”

But Judge Hartman did not grant the district’s request for a temporary restraining order, Christopher Liberati-Conant, Hartman’s law clerk, said shortly before 5 p.m. Thursday. “The commissioner’s stay is still in place.”

School board president Tim Taylor, an opponent of the relocation, said in an interview Thursday that the ruling means the end of the legal battle.

“This class will be going to Berner,” Taylor said. “We can’t keep fighting this.”

Parents, students and educators had been embroiled in a summer of uncertainty and dispute about where nearly 550 sixth-graders were to attend middle school come Sept. 6, the start of the 2017-18 academic year. Massapequa was divided into two camps over the issue: supporters wore blue at school board meetings, while opponents wore red.

advertisement | advertise on newsday

Superintendent Lucille Iconis and some parents have argued that Berner, home to seventh- and eighth-graders, would offer sixth-graders a more varied curriculum and better access to clubs and foreign language courses. But other parents and school board members, citing research, believed the transition to middle school has inherent challenges and should occur later on.

In February 2016, the school board approved the relocation. But on July 13, a newly elected board voted to cancel the relocation, and parents who supported the move filed the petition with Elia, who issued her stay on Aug. 3, barring the district from canceling the relocation until her office had finished reviewing the matter.

A spokeswoman for Elia said Thursday she could not comment because “the appeal is still pending.”

In court papers, lawyers for the school board had argued that issues caused by the July reversal were on track to completed in time for the start of the school year, from revising dozens of educational plans for students with developmental or learning disabilities to issues of staffing.

Taylor said he was “surprised” by Thursday’s outcome.

“We stopped the move. Unfortunately, the commissioner stepped in and, in my opinion, took local control away,” Taylor said. “We all agreed not to fight it any further . . . and we’ll have to have some discussion to see what the future holds.”

Three district parents testified during oral arguments. All supporters of the move, they left by car from Massapequa at 8:30 a.m. and did not have lawyers.

“We’re ready to come together as a community,” Rose Stein, one of the petitioners, said in a telephone interview on the ride home to Long Island Thursday night. “I feel like we’re part of the history of Massapequa.”