The Virginia House of Delegates today overwhelmingly passed a bill that would invalidate Alexandria's ban on firearms in city buildings and bar other localities from adopting similar policies.

The legislation is a broad measure to bar local governments from adopting laws or rules regulating gun use that have not been expressly authorized by state law. But its intent, supporters and opponents agree, is to overturn Alexandria's seven-year-old policy of barring guns from city buildings.

The effort originated in the Senate, which passed the bill earlier this month with language that exempted Alexandria's rule. But the House stripped that language out today at the urging of House Speaker S. Vance Wilkins Jr., Virginia's most powerful lawmaker and leading gun rights advocate. The amended bill passed 72 to 27, largely along party lines, with Democrats in opposition.

Disappointed Alexandria officials defended the city's firearms ban as a simple safety measure and said city residents are ill-served by meddling from the state.

"Many people cast this as a gun-control measure, and it really isn't," said Alexandria Mayor Kerry J. Donley (D). "It's a measure that preserves local government authority to govern the use of its public facilities. These are not places for weapons."

Senate Bill 593, sponsored by Sen. Emmett W. Hanger Jr. (R-Augusta), now goes back to the Senate floor, where lawmakers are expected to reject the changes passed by the House. It will then go to a conference committee of lawmakers from both chambers who will try to work out a compromise before the General Assembly's March 9 adjournment.

Alexandria ordered its firearms ban shortly after a shooting in front of a city recreation center. Rather than a city ordinance, it is technically an administrative rule that penalizes a violator first with a warning and then with a trespassing charge. The city prevailed in a court challenge in 1999.

Alexandria leaders argue that the city's ban -- which applies to about two dozen public buildings -- is a crucial safeguard for employees who can become caught in potentially dangerous situations in child-custody cases or other family disputes.

If the House version of the bill became law, Fairfax County's longstanding effort to adopt ordinances to ban firearms in local government buildings and recreation centers would be thwarted. A Circuit Court judge invalidated a ban on guns in government buildings in Fairfax in 1998, and the county's Democrats in the General Assembly have tried unsuccessfully for several years to pass legislation that would reinstate it.

Del. James M. Scott (D-Fairfax) said on the House floor today that he received a death threat while serving as a supervisor in Fairfax County. "Basically, if this is adopted, it doesn't prevent someone from bringing a shotgun or an Uzi into a Board of County Supervisors meeting," he said, calling the bill a "very bad idea."

But advocates of gun rights said that Alexandria's ban violates the spirit of Virginia's law denying powers to local governments that are not granted by the state. And they argued that such policies violate the constitutional rights of gun owners who have properly registered their firearms and are obeying the law.

"You can't [make this kind of rule] unless you get approval from the General Assembly," said H. Morgan Griffith (R-Salem), the House majority leader. "We shouldn't allow local government to get around the law just because individuals may be frustrated that the democratic process has worked in the legislature."

Similar legislation passed both chambers last year but died on a technicality in a conference committee. The House version of the bill took on new urgency for gun-rights advocates this year after Wilkins threatened to derail the reelection of the judge who upheld the Alexandria ban, Alfred D. Swersky. Wilkins grilled Swersky for more than an hour last month about his ruling. The speaker said he was concerned the judge may have overstepped his authority.

Gov. Mark R. Warner (D) has not taken a position on the bill, spokeswoman Ellen Qualls said.