City, town and county employees could store firearms and ammunition in personal cars at work under a bill that cleared a Virginia Senate committee Monday.

A customer at Bob Moates Sport Shop in Midlothian. (Ricky Carioti/THE WASHINGTON POST)

Under the bill that cleared the Senate Courts of Justice Committee, localities could no longer prohibit workers from storing guns and ammunition in private cars parked in employee parking lots.

The guns would have to be stored inside a container and the vehicle locked. Opponents have noted that the legislation does not require that the container itself be locked or that ammunition be stored out of sight.

The Senate committee amended the measure slightly from the version that cleared the House this month. It makes an exception for employees who work for mental health agencies and use their private cars to transport mentally ill people to doctor’s appointments.

The Senate committee also amended the bill to make clear that the measure would not apply to employees of colleges and universities.

Separate bills that would have prevented public colleges and universities from banning firearms on campus already failed this session, as did legislation to allow college professors to carry weapons on campus.

Also Monday, the full Senate passed a bill that would require localities that run gun buy-back programs to offer the collected weapons for sale instead of automatically destroying them. The Senate passed the bill, which had originated in the House, on a 23 to 17 vote.

The bill requires localities that obtain guns through buy-back programs to offer the weapons for sale to licensed firearms dealers, either through public auction or by sealed bids. Localities would have authority to destroy guns that remain unsold.

“If they catch a drug dealer and they take his car, do they destroy it? No, they sell it,” said Philip Van Cleave, president of the Virginia Citizens Defense League. “Why would you destroy something that has value? That makes no sense.”

Opponents had argued that the intent of gun buy-back programs was to take weapons out of circulation.

The Senate also voted Monday to pass a bill, known as the “Castle Doctrine,” that provides civil immunity to someone who fatally shoots an intruder. Another would strip localities of the right to require fingerprints as part of the application process for concealed handgun permits.