Washington (AFP) - City council members voted unanimously but reluctantly Tuesday to allow residents and visitors alike to carry concealed weapons in the streets of the US capital.

The measure replaces Washington's longstanding ban on carrying firearms in public, which a federal judge in July declared unconstitutional.

"We really don't want to move forward with allowing more guns in the District of Columbia," said council member Muriel Bowser, a front-runner in the city's mayoral election in November.

"But we all know we have to be compliant with what the courts say," she said, quoted by The Washington Post newspaper.

Washington outlawed public ownership of firearms in the mid-1970s, until the US Supreme Court ruled in 2008 that the ban violated Americans' constitutional right "to keep and bear arms."

Strict regulation remained in place, however, until July when a US District Court judge ruled that a prohibition on carrying guns in public also violated the US Constitution.

Tough gun laws are credited in part with helping to bring down Washington's once-notorious homicide rate, with just over 100 murders reported last year.

Tuesday's vote came amid the aftershock of a major security breach Friday when a former US army soldier, carrying a small folding knife, jumped over a fence and into the White House.

Prosecutors revealed Monday in court that the accused, Omar Gonzalez, had more than 800 rounds of ammunition in his car, and had previously been arrested in Virgina with a sawed-off shotgun, among other firearms.

Under the city's new legislation, gun-owners would still have to apply for a permit to carry a firearm in public, and show police that they have good reason to do so.

It would also remain illegal to carry a gun inside schools, hospital, government buildings, public transit, sports venues and anywhere within 1,000 feet (300 meters) of a dignitary under police protection.