MONTGOMERY, Ala. — The Alabama House of Representatives on Thursday approved a compromise child care bill aimed at getting more oversight for nearly 1,000 faith-based day cares that operate unlicensed by the state.

House members voted 86-5 for the legislation billed as a compromise between child welfare advocates and church centers. The bill moves to the Alabama Senate.

Alabama has had a longstanding law exempting faith-based day cares from state licensure and regulations such as maximum child-to-worker ratios. Nearly half of the 1,900 day cares in the state claim the religious exemption.

The bill by state Rep. Pebblin Warren, D-Tuskegee, would require all for-profit centers and ones that receive state and federal subsidies to get licensed. According to the Department of Human Resources, that would require about half of the 933 exempt day cares to get a license or stop accepting the subsidies. Centers that remain exempt will have to provide the state with employees’ criminal histories and proof of insurance and compliance with local fire and health inspections.

“I think it will be a giant step,” Warren said of the legislation. “They know somebody is looking.”

Under the bill, the state would inspect new faith-based facilities before opening and could go into existing ones if a problem was suspected. The day cares would have to post public notices informing prospective parents that the day care is unlicensed.

The federal government had recently required the state to begin inspecting day cares that take government funds. Warren said the Department of Human Resources found a total of 15,000 violations at the exempt centers since the inspections began last August.

Advocates for the bill pointed to children who had been injured, or killed, in recent incidents at exempt centers. Eighty-six children were sickened in 2015 at a Montgomery facility after eating food that had been left out overnight. A 5-year-old in Mobile died in August after being left inside a van at an exempt center.

However, the House-passed bill is significantly weaker than Warren’s original proposal. Warren last year sought to require all day cares to get licensed, but met with pushback from churches and conservative groups.

The version approved by the House on Thursday also stripped a proposal to allow the state to inspect exempt facilities once yearly. Warren described that as another compromise she to make to get the bill approved.

“I would love to see all day cares licensed in the state of Alabama,” Warren said.

Warren said when Alabama started the exemption for faith based facilities it was intended for “bona fide” churches that operated child care centers. However, over the years, she said it became a large loophole allowing any center that claimed a religious affiliation to escape state regulation.

“Half of the folks that are exempt right now don’t even have a church,” Warren said.

Rep. Danny Garrett, R-Trussville, thanked Warren for being willing to compromise.

“You have listened and you’ve addressed the problem which in my district is facilities that are hiding behind church covers but getting federal money that are not licensed,” Garrett said.