A federal judge has overturned a District of Columbia ban on carrying handguns in public, concluding that the Second Amendment protects a person's right to firearms outside the home.

In a 19-page ruling that was written on Thursday, but only released late Saturday, Judge Frederick J. Scullin Jr. ordered the city to allow residents to carry handguns — a milestone in a case that has been dragging on for five years.

"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," Scullin of the District of Columbia District Court said. "Therefore, the court finds that the District of Columbia's complete ban on the carrying of handguns in public is unconstitutional."

By way of background, The New York Times notes: "In 2008, the Supreme Court struck down the District of Columbia's all-out ban on handguns on the basis that it violated the right to bear arms guaranteed by the Constitution's Second Amendment. An appeals court in 2011 required handguns to be registered."

The Associated Press says the challenge, Palmer v. District of Columbia, came shortly after the city rewrote its gun laws following the landmark 2008 decision.

AP says: "New rules allowed residents to keep guns in their homes but required that they be registered. Gun owners now have to take a safety class, be photographed and fingerprinted and re-register their weapons every three years. Those requirements have also been challenged in court but were upheld by a federal judge in May."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.