New Jersey Gov. Phil Murphy signed legislation Wednesday to extend services that were interrupted by the pandemic for hundreds of special-needs students who would have aged out of the education system.

Murphy made the announcement at his daily coronavirus briefing, to the relief of special-needs advocates who feared the bill was in jeopardy. Murphy said as many as 8,700 students could be impacted over the next three school years.

Students who reach 21 would no longer have been eligible for services after June 30 without the extension. Advocates say special education students were especially hurt by learning loss during the pandemic and need the one-year extension to make up for time missed.

The extension could cost up to $600 million over three years, though final figures must be determined, Murphy said. The state plans to use federal stimulus aid to pay for it, he said. New Jersey will get more than $2.5 billion from the coronavirus relief package to address learning loss.

“This is one of the things that we take the step, regardless of the price tag,” Murphy said. “It is absolutely without question and hesitation the right thing to do.”

Pennsylvania lawmakers are considering a similar measure.

» READ MORE: Special needs advocates worry about the fate of a N.J. bill to extend services for students who have turned 21

“This bill is about hope and a belief that all children should have the opportunity to achieve their potential,” said State Sen. Dawn Marie Addiego (D. Burlington), the bill’s cosponsor.

Districts weeks ago began developing learning plans for special-needs students for the 2021-2022 school year. The new law would extend services for students with disabilities through the 2022-23 school year.

“Every student deserves a fair and equitable opportunity to a quality education, including young people with disabilities,” Senate President Stephen Sweeney (D. Gloucester) said in a statement. “They lost more than others when the classrooms and community programs closed their doors for most of the year.”

The extension is not automatic and not all eligible students are expected to participate in additional learning, said Mercedes Witowsky, executive director of the New Jersey Council on Developmental Disabilities. Districts make the final decision along with child study teams that include parents.

Public school districts are required to provide students with disabilities with an education based on an Individualized Education Plan, or IEP, through the school year in which they turn 21.

Because of the pandemic, many students missed out on transition programs offered during their last three years of school that teach life and job skills. Most of those services were halted or limited.

In a movement pushed by Laura Colnes, a South Jersey mother with a special-needs son, advocates spearheaded the extension bill and won bipartisan support. Colnes is pursuing legal action to keep her son, Sammy, 21, who has autism, in school.

“This is a great victory for students,” Colnes said. “I just hope that districts will do the right thing and give students the year that they didn’t have. "