RICHMOND — The General Assembly approved a bill this week to toughen criminal penalties for straw gun purchasers, part of a package of school safety legislation offered by Gov. Robert McDonnell (R) in the wake of the December shootings in Newtown, Conn.

The measure — which passed the House Wednesday and the Senate Thursday, both by wide margins — will make it a more serious offense under state law for a person to buy a gun for the purpose of giving it to someone who is legally barred from having a firearm because they have a felony conviction or mental illness, among other reasons.

The bill mandates that a convicted straw purchaser serve at least one year in prison, ending the possibility of a suspended sentence. The original version of the measure required a longer prison sentence but was watered down by a House committee.

The straw gun bill is one of several proposed by McDonnell in early February following the recommendations of a School and Campus Safety Task Force.

Another measure suggested by McDonnell, which would have made it illegal for anyone to bring an explosive device or firearm onto a school campus with the intent to commit a felony, was tabled by a House committee earlier this week. Opponents said the bill merely added an offense to an act that was already illegal.