The Buffalo Teachers Federation voted Thursday to take the Buffalo school district to court to enforce a teacher-evaluation agreement that the state Department of Education, the state education commissioner and the governor have declared illegal.

The BTF Executive Committee unanimously approved the resolution to take legal action against the district by June 1 and file additional grievances for “non-adherence” to a pact the district made with the union in January. The agreement stated that the district would not use two years of teacher evaluations as grounds for termination.

“We will leave no stone unturned to make sure these evaluations, which everybody now realizes were flawed, aren’t being held against our teachers,” said BTF President Philip Rumore.

State officials said the side agreement reached between the district and the union is invalid because it was not submitted to the state as part of the district’s official teacher-evaluation process.

Legal action by the teachers union could threaten the status of more than $30 million in state aid this year, in addition to more than $10 million in various other government funding this year and tens of millions in future years.

Rumore said the BTF will work with the New York State United Teachers union to legally challenge any effort by the state to withhold funds from the Buffalo Public Schools.

“We’re going to fight to make sure that they don’t use our kids as pawns in order for us to get this money,” he said.

Finally, the BTF may still consider rescinding, by vote of all Buffalo teachers, its approval of the teacher evaluations for the last two school years.

Superintendent Pamela C. Brown said Thursday no agreement can supersede the rules set forth by the state. “I regret that the BTF has decided to pursue this course of action,” she said.

She pointed out that part of the written agreement between the union and the district stated that all parties agreed “to adhere to all applicable state rules, laws and regulations.”

Based on that, she said, “it’s my understanding that we are following through with the process that was negotiated and agreed to by the union and the district.”

In 2011-12, Buffalo was one of a handful of districts across the state receiving federal school-improvement grants.

To qualify for the money, the district had to have a state-approved teacher-evaluation plan in place at the six schools receiving the grants: Martin Luther King Jr. Multicultural Institute; International School 45; and Bennett, Riverside, South Park and Burgard high schools.

That means the 400 or so teachers at those six schools were evaluated last year. They got their evaluations about two months ago, and many reportedly were rated “ineffective.”

The state law allows districts – but does not explicitly require them – to pursue termination for any teacher who gets rated “ineffective” two years in a row. It also states that schools “shall” use the evaluations in employment decisions, including terminations.

“Buffalo teachers and teachers across New York State would not have entered into agreements utilizing untested, untried evaluation systems without assurances that due to its untested procedures, it would not be used against them,” the BTF resolution says.

Much of the resolution highlights what the union considers to be significant flaws in the teacher-evaluation formula.

In one Buffalo school, it states, 11 teachers were rated “effective” on all 22 classroom indicators but still wound up with a composite score of “ineffective.”

In other cases, where two teachers worked with the same set of students, one received 20 evaluation points, while the other teacher received zero.

Brown said that she was unaware of the specific instances cited in the BTF resolution but that she hopes some solution could be reached.

“We want to be able to work with the union to find common ground and adhere to state regulations while treating all employees in a fair and consistent way,” she said.

Rumore repeated his assertion that there are many school districts across the state with similar side agreements with their unions.

“There were 30 between here and Rochester,” he said.

But Carl Korn, spokesman for the state teachers union, said NYSUT doesn’t track that information, and he knows of no district that has sought help from the state union to deal with any similar concern.

He added that the BTF would receive whatever assistance the state union can provide in this matter. “Our local unions are autonomous,” he said, “and we fully support the actions by our local leaders.”