TOPEKA — The House passed the largest tax increase in Kansas history in the dark hours of this morning — clawing past tears and fatigue to endorse a measure to fill the state’s budget hole after the governor warned of imminent fiscal calamity.

The Republican-dominated chamber approved two bills that in combination would hike sales taxes and cigarette taxes, while limiting the power of cities and counties to raise property taxes.

Lawmakers have been struggling for weeks to find a path forward that raises approximately $400 million in revenue the state needs to balance its budget. The House finally crossed the finish line just after 4 a.m. after a debate that began at about 1 a.m., and after the vote was left open two hours.

In a 63-45 vote, lawmakers approved House Bill 2109 — the core bill and the more controversial of the two measures. The legislation passed with exactly the number of votes necessary.

The other, Senate Bill 270, was approved 63-44. Because of how the tax deal is structured, the Senate must now approve Senate Bill 270. Senators were scheduled to meet later this morning.

Republican leadership only gained the razor-thin majority needed for passage after intensely working the phones during the 3 a.m. hour and implementing a call of the House to keep members in their seats while state troopers searched for absentees.

The success of the bills was a wholesale reversal of the outcome of a vote less than 24 hours earlier, when the House rejected a tax plan with several similar provisions by a wide margin. In the intervening day, Republicans were pressed by Gov. Sam Brownback, who promised massive cuts by Monday unless a revenue package was sent to his desk.

The Legislature already has passed a budget but hasn’t yet approved legislation to pay for it. According to the Brownback administration, even though the new fiscal year begins July 1, officials need to move forward soon on preparing to implement the budget — hence the need for either a revenue package or large cuts in the next few days.

Administration officials have raised the possibility that without legislative action, 6 percent across-the-board spending cuts could be made to balance the budget, or issue line-item vetoes of higher-education spending. The latter possibility would amount to a machete to state universities, gutting more than $100 million from the University of Kansas, for example.

House Tax Committee Chairman Rep. Marvin Kleeb, R-Overland Park, suggested a fiscal crisis would come if the bill does not pass while briefing Republicans about the measure.

“This needs to pass here in the next few hours. Hopefully everyone will be onboard to help that happen. If that does not happen, schools may not receive payments, state employees are not going to be paid, (pension) payments are not going to be made. A lot of things are not going to happen,” Kleeb said.

“We could be looking at furloughs and all sorts of things.”

The plan passed early Friday would leave the state with an estimated $86 million ending balance, but estimates assume the governor will make $50 million in cuts — an assumption not made in previous plans. Brownback told Republicans on Thursday he was willing to accept his “share of the blame,” but did not provide specifics.

The plan would set the state sales tax rate at 6.5 percent, up from the current 6.15 percent. But unlike in some earlier proposals, taxes on food would not be lowered.

Earlier proposals had delayed the drop on food for a year, to July 2016. Kleeb said lawmakers want to be able to lower the rate on food when the Legislature reconvenes next year.

“We would like to be able to vote for that lower food sales tax, have it starting in July 2016, and we’d like to be able to vote on that next January or February and have a nice, positive thing to vote on,” Kleeb said.

Taxes on cigarettes would increase by 50 cents to $1.29, along with a new tax on e-cigarettes, under the legislation. The plan also assumes $47 million is produced through new fees on managed care organizations, which is contained in different legislation.

Individual income tax rates would stay at 2.7 percent and 4.6 percent until tax year 2018, when the rates would drop by 0.1 percent.

The plan also includes the governor’s proposal to exclude up to 380,000 poor individuals from paying income taxes. Previous proposals had included a provision that would have eventually removed all sales tax exemptions. That idea was tossed from the latest legislation.

Cities and counties also would be prohibited from raising property taxes in excess of inflation without a public vote under the legislation, though some exceptions, such as increases for construction or bond payments, were included.

House Minority Leader Rep. Tom Burroughs, D-Kansas City, said the legislation had been crafted and pushed forward without proper vetting or committee hearings.

“We are here tonight because of failure to communicate. To do that, one party has to listen. But it is one thing to listen and another to truly hear. Many in this body were warned about this looming crisis but failed to listen. And now, again, history is about to repeat itself,” Burroughs said.

Republicans had been divided in recent days into several factions. One of the main points of contention among the unofficial caucuses were about whether to make changes to tax breaks for business owners. The exemptions, which shield owners from having the pay income tax on non-wage income, have been fiercely defended by Brownback.

Through his subordinates, Brownback had issued a public veto threat that he will veto legislation that raises business taxes.

In the end, those pushing for changes lost. Rep. Mark Hutton, R-Wichita, led a faction of Republican who had pushed for changes. On Wednesday, he conceded his efforts had faltered this year and he voted in favor of tax bills during debates on Thursday and Friday.

Though dozens of Republicans in the end voted to raise taxes, they wrung their hands at the same time, often making a point of voicing their displeasure with the legislation. Rep. John Whitmer, R-Wichita, spoke through tears as he explained his yes vote.

“I voted for something I am not proud of,” Whitmer said, “but I feel it’s what the folks need.”