Indiana lawmakers approved a controversial bill late Thursday to allow guns in parked cars on school property, despite objections from school groups and gun reform advocates.

The measure, supported by the powerful National Rifle Association, cleared the Senate on a 38-10 vote. The House followed suit, voting 75-24 and sending the measure to Gov. Mike Pence for consideration

The votes on Senate Bill 229 followed floor debates between lawmakers who wanted to protect the gun rights of licensed permit holders and those who felt the measure would lead to more access to guns and possibly more violence.

Sen. Jim Tomes, R-Wadesville, bill author, said the measure allows people who can legally possess firearms to have their guns on school property only if concealed in locked cars on parking lots.

It doesn't allow guns in the schools, buildings, school buses or at any functions where there are students present on school grounds, he said.

But the bill would allow teachers, parents, schools visitors and high school students who are members of gun clubs to have guns locked in their cars in school parking lots. Student gun club members would have to receive permission from school principals.

Under current law, people who have guns in their cars on school property would be committing a felony.

Speaking in favor of the bill, Sen. Brent Steele, R-Bedford, said he finds it odd that the state trusts teachers with enough common sense to teach children, but not to be smart enough to lock their own firearms in their vehicles.

"Teachers have to leave their 2nd Amendment rights at the front door when they go to work," said Steele.

Sen. John Broden, D-South Bend, said the bill goes too far because it removes the discretion of school districts to approve gun-free parking lots, if they so choose.

He said schools can be one of the most combustible workplaces — with students being expelled or tensions rising at sporting events — so he doesn't think it's wise to introduce more weapons on school property.

Many education groups, child advocates and gun opponents have strongly objected to any provision that allows guns on school property.

Shannon Watts, a Zionsville mother of five children and founder of Moms Demand Action for Gun Sense in America, a national gun reform group, said in a statement that she is glad the language of the bill was softened to ensure guns are not allowed elsewhere on school property.

But she added the group remains "strongly opposed to legislation that would jeopardize the safety of our children by allowing guns in and around schools and school activities."

Another provision of the bill requires law enforcement agencies to fund firearms buyback programs only with private funds or grants, not with public money, as they can now.