NASHVILLE, Tenn. (AP) — The Republican-led Tennessee Legislature on Thursday passed a controversial bill aimed at imposing work requirements on people receiving Medicaid benefits. In Tennessee, the Medicaid program is called TennCare.

Gov. Bill Haslam has said previously that he would sign the bill.

The Senate voted 23-2 in favor of it Thursday. The House passed it last month.

Health care advocates denounced the vote afterward, with one calling it a "politically inspired bill" that wastes taxpayer funds and punishes mothers when they lose their jobs.

"The bill recklessly puts thousands of vulnerable children, seniors and people with disabilities at risk that the state system will cost them their health coverage," Michele Johnson, executive director of the Tennessee Justice Center continued in her statement. She said lawmakers should concentrate their efforts on expanding the health care program, like other states.

One of the prime sponsors of the legislation was House Speaker Beth Harwell, who is running for governor.

The measure would require able-bodied people without children under the age of 6 to spend 20 hours a week working, volunteering or attending school.

Some lawmakers said that's an easy enough requirement to meet because Tennessee allows adults without a degree or certificate to go to community college or technical school without having to pay tuition.

TennCare covers a limited group of about 1.4 million people, primarily low-income pregnant women, children up to age 21, the elderly and the disabled. About 86,400 able-bodied adults with dependent children older than 5 would have to work, though an estimated 49,300 of them already do, according to a legislative analysis.

The bill ran into trouble earlier in session because of the costs that would come with verifying that people are actually working, volunteering or going to school.

The legislation looks to use about $37 million annually in Temporary Assistance for Needy Families program reserve money to enforce the measure.

If signed into law, the bill would authorize TennCare to seek a waiver under President Donald Trump's administration, which is allowing state Medicaid work requirements. In addition to getting the waiver, the state would have to get permission to use the TANF reserve money.

The Trump administration has approved Medicaid work requirements in Kentucky, Indiana and Arkansas, all Medicaid expansion states through the Affordable Care Act.

Sen. Jeff Yarbro, D- Nashville, filed an amendment to the legislation to try and get TennCare expanded in Tennessee, but that was shot down.