FRANKFORT, Ky. — With the chants of hundreds of teachers ringing in their ears, Kentucky lawmakers voted 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 inside and outside the Capitol, forcing more than 30 school districts to close as Kentucky continued the chorus of teacher protests across the country. The rally took on a festival-like atmosphere in Kentucky as some teachers sat in lawn chairs or sprawled out on blankets. Crosby Stills, Nash and Young’s hit “Teach Your Children” bellowed from the loud speakers.

“I don’t want to be out of my classroom. I want to be in my classroom instructing future citizens, but I’m afraid that spending at the state level is getting worse and worse, and we need those dollars for a 21st century education,” said Stephanie Ikanovic, who has been a teacher for 21 years.

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 repair. But Gov. Matt Bevin vetoed both the budget and the money in it, calling the bills “sloppy” and “non-transparent.” He said they would not raise enough money to cover the new spending.

The veto put Republican lawmakers in a tough position, 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, asserting their independence after a tumultuous year marred by a sexual harassment scandal.