Updated

A federal judge Thursday upheld registration requirements that are part of the gun laws in the nation's capital, approving of measures that make owners take a gun safety class, be photographed and fingerprinted and re-register their weapons every three years.

The city put the requirements in place after a landmark 2008 Supreme Court decision that ended a 32-year-old handgun ban in the District of Columbia. U.S. District Court Judge James Boasberg ruled that requirements the city put in place are constitutional.

This isn't the first time a judge has approved of the requirements. A judge first upheld them in 2010 after a group of residents sued. A year later, however, an appeals court upheld a city ban on assault weapons but told the District it had to explain further why its registration requirements are necessary. In his 62-page ruling Thursday, Boasberg accepted the city's reasoning.

Boasberg began his ruling by noting "The District of Columbia knows gun violence," and citing high-profile guncrimes in recent years, including a gunman's fatal shooting of 12 people at the Washington Navy Yard last year. Boasberg said the city has enacted some of the most restrictive gun laws in the nation in "an effort to stem this violence and promote public safety."

"The people of this city, acting through their elected representatives, have sought to combat gun violence and promote public safety. The Court finds that they have done so in a constitutionally permissible manner," he wrote.

Stephen P. Halbrook, a lawyer who represented the residents who sued, said he was "disappointed" that all the registration requirements were upheld. He said he expected to appeal the ruling to the U.S. Court of Appeals for the D.C. Circuit. He also took issue with Boasberg's use of the Navy Yard case and other crimes committed with guns.

"Our point is the restrictions on law-abiding people doesn't help that situation," said Halbrook, who represents the group that includes Dick Heller, the man who challenged the city's handgun ban and won before the U.S. Supreme Court.

Only six states and the District require the registration of weapons, according to the San Francisco-based Law Center to Prevent Gun Violence. The District and Hawaii are the only places in the country where the requirement applies not only to handguns but also to rifles and shotguns.

Restrictions in the District also include that a resident can only register one pistol a month. A required training and safety class is free, takes about 30 minutes to one hour to complete and can be taken online or at the police department.

D.C. Mayor Vincent Gray called Thursday's ruling an "important win for public safety" in the city.

"I appreciate the court's affirmation of our sensible gun control laws and urge other jurisdictions to follow our lead," Gray said in a statement.