This is a representative image of a handgun.
Handgun Reuters

WASHINGTON (Reuters) - A federal judge on Saturday overturned Washington D.C.'s ban on carrying handguns outside the home, saying it was unconstitutional.

"There is no longer any basis on which this Court can conclude that the District of Columbia's total ban on the public carrying of ready-to-use handguns outside the home is constitutional under any level of scrutiny," JudgeFrederick Scullin said in an opinion.

"Therefore, the Court finds that the District of Columbia's complete ban on the carrying of handguns in public is

unconstitutional," he added in his 19-page ruling.

The court ordered the city to allow residents to carry handguns outside their homes and to let non-residents carry them as well.

Scullin made the ruling in the PALMER et al v. DISTRICT OF COLUMBIA et al case, which has been dragging on for five years.

In 2008, the Supreme Court struck down D.C.'s all-out ban on handguns on the basis that it violated the right to bear arms guaranteed by the U.S. Constitution's Second Amendment.

An appeals court in 2011 required handguns to be registered.