Kentucky lawmakers voted to lift a statewide public school mask mandate late Thursday after an emotional debate. 

"This bill will give local control back to the districts — not mandating they do, not mandating they don't," Republican state Sen. Max Wise, the bill's sponsor, said during debate. "They make the decision of what they think is best for their constituents in their communities."

Democratic Gov. Andy Beshear vetoed portions of the bill, which gives local school boards the authority to make masking decisions, but was quickly overridden by the Republican-led legislature. The bill also affects childcare centers.

Its passage came at the end of a special session called by the governor to address a coronavirus surge that has overwhelmed hospitals in the state. 

"This bill ... is really a life-and-death bill," Democratic Sen. Reggie Thomas claimed during the debate. "If we eliminate mask mandates, then we are putting all children and all school personnel at severe risk."

FILE - In this Tuesday, Sept. 7, 2021. file photo, Kentucky Sen. Max Wise listens to a speech during the opening day of the Kentucky State Legislature special session in Frankfort, Ky. (AP Photo/Timothy D. Easley, File) (AP Photo/Timothy D. Easley, File)

KENTUCKY GOV SUFFERS LEGAL DEFEAT IN COMBATTING COVID SURGE

Republican Rep. John Blanton said the bill removes a "one-size-fits-all" approach.

"We are not taking masks away from your children today," he said. "Masks are still part of the tools that's provided for each and every school district across this state."

The bill also aims to keep children in the classroom as much as possible by limiting remote instruction to a particular school or classroom – instead of the entire district – when there’s an outbreak. 

Another bill passed Thursday night bans statewide mask mandates, also leaving that power to local governments and businesses. 

Beshear warned Thursday that only 90 adult intensive care beds were available statewide. He noted nearly two-thirds of Kentucky's hospitals face critical staffing shortages, and more than 300 Kentucky National Guard members will be headed to 21 hospitals to assist health care workers.

Beshear has called masks "safe" and "effective" and recently said he thought another mask mandate was needed to confront the current surge.

The governor has issued statewide mandates in the past. 

While Beshear was previously allowed to use his emergency powers to issue health orders unilaterally, a state Supreme Court ruling last month gave lawmakers the authority to make laws limiting his power. 

CLICK HERE TO GET THE FOX NEWS APP

The legislature also passed a measure to appropriate more than $69 million in federal funds for pandemic-related efforts. The funds are aimed at increasing COVID-19 testing for health care providers, schools, health departments and correctional facilities. The governor signed that measure into law, his office said.

The Associated Press contributed to this report.