The measure, supported by the 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 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.

Republican state Sen. Jim Tomes, 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 in 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, school 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, Republican Sen. Brent Steele 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 Second Amendment rights at the front door when they go to work," said Steele.

Democratic Sen. John Broden 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 that 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."