FRANKFORT, Ky. — With the chants of hundreds of teachers ringing in their ears, Kentucky lawmakers voted on Friday to override the Republican governor’s veto of a two-year state budget that increases public education spending with the help of a more than $480 million tax increase.

The votes came as thousands of teachers rallied at the Capitol, forcing more than 30 school districts to close as the state continued the chorus of teacher protests across the country.

The two-year state operating budget includes record new spending for public education, fueled by a 50-cent increase in the cigarette tax and a 6 percent sales tax on some services, including home and auto repairs. But Gov. Matt Bevin vetoed the budget and revenue bills, calling the latter “sloppy” and “non-transparent.” He said it would not raise enough money to cover the new spending.

The veto put Republican lawmakers in a tough position by asking them to vote a second time on a tax increase in an election year. But 57 House Republicans, later joined by just enough Senate Republicans, voted to override.