TOPEKA, Kan. (AP) — Public school teachers in Kansas likely will lose their legal protections against getting fired after legislators tacked that and other policy changes onto a court-mandated plan to boost aid for poor school districts.

The plan narrowly approved by the Republican-dominated Legislature late Sunday night provides Kansas’ poorest districts an additional $129 million during the next school year. It’s the full amount needed to reverse recession-driven cuts that led the state Supreme Court to declare last month that there were unconstitutional gaps in funding between poor districts and wealthier ones.

Many Republicans, driven by low-tax, small-government views, wanted to spend far less but quickly found their hopes dashed. Once that happened, they pursued changes to start overhauling public education and promote school choice for parents, most of which had foundered previously.

Starting in July, teachers who’ve been in classrooms three years or longer but face dismissal would lose the right to have their cases heard and decided by independent hearing officers, a protection some have enjoyed since the 1960s. Corporations will be eligible for tax credits for bankrolling private-school scholarships for poor and at-risk students. A new commission will hunt for efficiencies in public education, even as new dollars flow to classrooms in poor districts.

“When we learned about the price tag, we just felt it was only appropriate that we ask more of the institution,” said Senate President Susan Wagle, a Wichita Republican, referring to public education.

Republican Gov. Sam Brownback praised the package, suggesting he’ll sign the legislation. But dozens of red-shirted educators, members of the Kansas National Education Association, the largest teachers’ union, flooded the Statehouse over the weekend to lobby against the plan, and their leaders acknowledged that money was not the issue. Much of the final debate in both chambers focused on ending or saving teacher tenure.

Sen. Tom Hawk, a Manhattan Democrat, complained about a “hijacking” of school funding legislation. Teachers’ union officials said educators are insulted by the final product and believe it inhibits academic freedom and make it more difficult for teachers to deal with well-connected parents, advocate for individual students and challenge administrators’ decisions.

“We are just at will, at their will, basically, and we won’t be able to fight for what we truly believe is right for our schools,” said Melissa Modig, a sixth-grade teacher at Rochester Elementary School in north Topeka.

Supporters of ending tenure argued that it would make it easier to remove under-performing teachers from the classroom, and Wagle said it’s important as the state demands more of its public schools. The proposal also had the backing of the conservative group Americans for Prosperity.

The push for a range policy changes arose in the Senate, where GOP conservatives have a supermajority. It found less favor in the House, where the top GOP leaders are conservatives but where Democrats and moderate Republicans together still can influence what passes.

GOP conservatives didn’t get every change they wanted. House and Senate negotiators jettisoned a property tax break for families that home school their children or send them to private schools, as well as a proposal to block schools from using multistate Common Core standards for reading and math. Proposals to encourage the creation of additional schools operating under independent charters — and possibly competing with traditional public schools — were stillborn.

Yet what passed embodied conservatives’ view that providing a good education for every child requires overhauling public education and promoting school choice initiatives. House Education Committee Chairwoman Kasha Kelley, an Arkansas City Republican, said the state’s duty is to provide “a path to a successful education” for all students and, “That’s more than money.”

“You have to have it, but it runs its course, and you have to look at reform in the classroom in terms of the institution itself,” she said. “You’ve got to look at other things.”

In its decision last month, the Supreme Court said the gaps in funding between poor districts and wealthier ones were unconstitutional. It also returned the lawsuit to a three-judge, lower-court panel for more hearings on whether the $3 billion a year the state spends on its public schools overall also is adequate.

The justices said if lawmakers simply reversed the past cuts in aid to poor school districts — the $129 million-a-year solution — there’d be no further review of whether the gaps between poor districts and wealthier ones still existed. But the justices didn’t preclude other solutions to that “equity” issue, though others would have required additional court review.

Wagle acknowledged many Republicans initially hoped the Legislature could increase aid to poor school districts by far less than $129 million a year — perhaps by as little as $30 million. But she said they learned quickly that “the price tag was going to be very high.”