The Alexandria City Council on Saturday passed legislation that from July 1 bans guns on city property and streets where special events are being held, making it the first city to take advantage of new Virginia laws that tightened gun restrictions this spring.

The council passed similar legislation last fall after the mass shooting at the Virginia Beach municipal offices, but without authority from the Virginia General Assembly, it did not take effect. But this weekend’s approval came after the General Assembly passed, and Gov. Ralph Northam (D) signed, multiple laws that toughened the commonwealth’s gun laws, including a measure allowing local governments to regulate weapons on city property.

After hearing about three dozen speakers, most of whom opposed the city’s proposal, the Alexandria council voted unanimously to bar guns, ammunition and related components from city buildings and parks, as well as from recreation and community centers. Most civilians carrying guns cannot stand on streets and sidewalks adjacent to special events, or they will be subject to a first-degree misdemeanor charge punishable by up to a year in jail and a fine of up to $2,500.

“The General Assembly was right to give local governments the authority to regulate how firearms are used on public property,” Mayor Justin Wilson (D) said. “Protecting public safety is a core responsibility of government. This ordinance is a statement of our community’s values.

Many of the speakers argued that a ban should carve out an exception for people who hold concealed-weapons permits. The legislation already exempts several groups including law enforcement officers, security guards working for the city, military personnel, museums displaying firearms, historical reenactors and intercollegiate teams that use guns.

Some residents argued strongly for the ordinance.

“This will prohibit the increasingly frequent provocative displays” by gun-rights activists who show up at Alexandria events, said resident Kevin Connell, who, like others, called in to the meeting conducted remotely because of coronavirus restrictions.

Opponents of the law pointed to the 2017 gun attack on the Republican congressional baseball team at Alexandria’s Simpson Field and speculated about what would have happened if several officials had not been accompanied by federal security guards.

Last weekend, about 200 armed gun-rights advocates organized by the Virginia Citizens Defense League showed up to demonstrate in front of City Hall, and previously, people openly carrying weapons stood around the crowded Saturday farmers market there. State Del. Mark Levine (D), who co-sponsored the legislation that allowed the city to take its action, said that his home address was publicized by gun-rights activists and that several showed up at the public park near his home to intimidate him.

Philip Van Cleave, president of the league, called the local law “clearly punitive” to holders of concealed-carry permits. Levine said existing permit holders had faced only a 10-question online test and a background check. New permit seekers will face tighter requirements to get their permits.