The state legislature’s 2013 repeal of teacher tenure has been ruled unconstitutional by the state Supreme Court.

“Today is a win for educators, public schools, and most importantly students,” teachers association President Rodney Ellis told the News and Observer.

The legislature had revoked career status for teachers who had been able to earn tenure after getting approval from their local Board of Education.

The court ruled unanimously that the repeal voided the contracts clause of the U.S. Constitution.

The lawsuit also claimed the repeal was illegal taking of property, but the court did not hear that argument because of the initial ruling.

“The Court has heard the voices of teachers that North Carolina should honor its commitment of basic employment rights,” Ellis said. “We are glad the Court recognized the General Assembly’s attempt to strip away rights from teachers as unconstitutional.”