In a mixed decision, a federal appeals court on Friday struck down as unconstitutional several strict gun registration laws in the nation's capital, but upheld other restrictions aimed at public safety. 

The U.S. Court of Appeals for the District of Columbia Circuit ruled 2-1 that the city cannot ban gun owners from registering more than one pistol per month or require owners to re-register a gun every three years. The court also invalidated requirements that owners make a personal appearance to register a gun and pass a test about firearms laws. 

But the court upheld other parts of the law, such as requiring that so-called long guns -- including rifles and shotguns -- be registered along with handguns. The ruling also allows gun owners to be fingerprinted and photographed, pay certain fees and complete a firearms safety training course. 

In all, the court upheld six gun laws and struck down four. 

The District of Columbia put the registration laws in place after a landmark 2008 Supreme Court decision that struck down a 32-year-old handgun ban in the District of Columbia. The high court ruled in that case the Second Amendment protects handgun possession for self-defense in the home. 

A federal judge had previously upheld all the new registration laws. 

District of Columbia officials argued that the laws were aimed at preserving gun owners' constitutional rights while also protecting the community from gun violence. 

But writing for the appeals court majority, Judge Douglas Ginsburg said some of the laws did not pass constitutional muster. He rejected, for example, the city's argument that the one-pistol-per-month rule would reduce illegal trafficking in weapons. 

"The suggestion that a gun trafficker would bring fewer guns into the District because he could not register more than one per month there lacks the support of experience and of common sense," Ginsburg said. 

Ginsburg, who was appointed by President Ronald Regan, was joined by Judge Patricia Millett, an appointee of President Barack Obama. 

Judge Karen LeCraft Henderson, named to the court President George H. W. Bush, dissented in part, saying she would have upheld all the registration laws. She said the majority should have shown more deference to public officials trying to create a workable firearms policy. 

Henderson noted that Washington is different from other jurisdictions given the "unique security risks" in a city filled with high-level government officials, diplomats, monuments and government buildings that ban guns. 

Washington Mayor Muriel Bowser said she was not surprised by the decision after she was informed of the ruling during a radio interview. 

"Our gun laws have been under attack for many years," Bowser said. "We obviously disagree." 

Bowser, a Democrat, said the District of Columbia Council should be free to pass laws with "reasonable restrictions" on gun ownership in their city. 

Only six states and the District require gun owners to register some or all firearms, according to the San Francisco-based Law Center to Prevent Gun Violence. The District is one of only a few places -- including Hawaii and California -- that also have registration requirements for rifles and shotguns. 

Adam Winkler, a constitutional law professor at UCLA Law School, said that while the ruling may be a setback for the District it shows that courts are willing to uphold some restrictions on gun owners that enhance public safety. 

"This decision leaves little doubt that gun registration is constitutionally permissible," Winkler said. "States that want to require gun owners to register their guns will be buoyed by this decision." 

Winkler said it may be the final ruling on Washington's gun laws because the Supreme Court has shown little interest in taking up gun cases over the past few years. 

The latest lawsuit was brought by Dick Heller, the same man who challenged the city's handgun ban and won before the U.S. Supreme Court. 

It was the second time the appeals court had considered the registration laws. In 2011, the court upheld the constitutionality of the basic registration requirement for handguns, but sent the case back to a lower court so city officials could explain why the various other restrictions were necessary.