New Jersey reached a settlement Friday that offers a clear path for juniors and seniors to graduate, after a court declared current public school standardized testing requirements illegal.

The settlement clears a path for about 170,000 juniors and seniors who had passed state exams and who the state said were "in limbo" after the court's decision.

Under the court-approved settlement, the state will allow high school juniors and seniors to graduate if they have passing scores on state PARCC exams or other approved standardized tests, such as the SAT, ACT or the military placement exam.

The agreement also provides the Department of Education with time to propose new graduation testing rules for the classes of 2021 and 2022, who are current freshman and sophomores.

The agreement helps "current high school students left most vulnerable by the court’s recent decision," said Alyana Alfaro, deputy press secretary for Gov. Phil Murphy. "It will ensure that high school students in the classes of 2019 and 2020 have a clear pathway to graduation.

"In addition, this agreement will provide additional time needed to determine the best approach for testing students in the Class of 2021 and beyond."

Jessica Levin, senior attorney with the Education Law Center, which filed the lawsuit, said the group was "pleased to reach an agreement that safeguards the graduation rights of seniors and juniors who relied on the rules invalidated by the court."

"We look forward to working collaboratively with state officials to develop appropriate graduation policies for future classes," she said.

A three-judge panel of the Superior Court Appellate Division ruled Dec. 31 that the state's testing requirement for high school graduation was illegal. New Jersey had required students to take the PARCC Algebra 1 and 10th-grade English exams in order to graduate. But that contradicted New Jersey law stating that students pass a single test in 11th grade in order to graduate, according to the court.

State seeks long-term fix for PARCC

In the weeks after the court decision, parties grappled with how to resolve the problem. The Education Law Center and the American Civil Liberties Union of New Jersey, which filed the lawsuit, called for the state to pass legislation suspending the testing requirement.

The lawsuit was brought on behalf of the Latino Action Network, the Latino Coalition of New Jersey, the Paterson Education Fund and the NAACP New Jersey State Conference.

More:NJ awarded nearly $1.63 million in state aid to undocumented students in the fall semester

More:How will LGBT history be taught in New Jersey schools after new law?

More:Bergen County students hold vigil to remember Parkland victims one year after shooting

Senate and Assembly committees have advanced corresponding bills to change law to allow the state to give "an assessment or assessments" for graduation and eliminate the requirement that it be given in 11th grade.

The debate comes as New Jersey is working to develop a new state exam, after Murphy promised to phase out PARCC, named for the Partnership for Assessment of Readiness for College and Careers, a group of states that developed the exams.

While it's not in the agreement, the governor's office said it anticipates adopting a new state assessment in the 11th grade starting next year. Other testing options for graduation will not be continued, but the state plans to keep the work portfolio appeals process.

Rolled out in 2014-15, PARCC replaced the earlier NJASK exam that critics said was too easy, noting that many students passed without skills needed to succeed in college or careers.

PARCC was controversial from the start. With PARCC, students were sitting for more exams in high school. Families and educators said the tests were too hard or time-consuming, and that they forced teachers to “teach to the test.”

Students struggled to pass the tests, while thousands refused to take them at all in what became known as the opt-out movement. But supporters, including business and college leaders, said students weren't adequately prepared and needed more rigorous standards.

Last fall, the education department announced it was shortening testing time and renaming the exams as New Jersey Student Learning Assessments. The department also lowered the impact of student test scores on teacher evaluations from 30 to 5 percent.

Federal law requires states to test students in math and reading in grades 3 to 8 and at least once in high school to measure progress and identify schools in need of additional support.

But it does not require states to use those tests as a graduation measure, and Murphy said during his campaign that he would eliminate the “exit testing” requirement.

"Governor Murphy has long held that the era of high-stress testing must end in New Jersey and, since taking office, has set the state on a path to do just that," Alfaro said.