A federal judge upheld Connecticut's gun control law on Thursday, saying the sweeping measure is constitutional even as he acknowledged the Second Amendment rights of gun owners who sued to block it.

The law, which Gov. Dannel P. Malloy signed last April after months of negotiations in the legislature, was not entirely written "with the utmost clarity," U.S. District Judge Alfred Covello said in his 47-page decision. Still, several provisions are "not impermissibly vague in all of their applications and, therefore, the challenged portions of the legislation are not unconstitutionally vague."

Lawmakers, responding to the shooting massacre at Sandy Hook Elementary School that killed 20 children and six educators on Dec. 14, 2012, banned the sale of large-capacity magazines and made more weapons illegal under the state's assault weapons ban.

"While the act burdens the plaintiffs' Second Amendment rights, it is substantially related to the important governmental interest of public safety and crime control," Covello ruled.

Brian Stapleton, the lawyer for a group of Connecticut organizations that support gun rights, pistol permit holders and gun sellers, said he will appeal.

"This is a disappointing decision, but not entirely surprising," he said. "This is a long way from over."

Stapleton said the ruling acknowledges the plaintiff's Second Amendment rights "before it guts them."

Malloy said in a statement that the court made the right decision.

"The common-sense measures we enacted last session will make our state safer and I am grateful for the court's seal of approval," the governor said.

Attorney General George Jepsen said the law is "entirely appropriate, sensible and lawful."

"We will continue to vigorously defend them in the event of any appeal that may be filed of this decision," he said.

Statpleton said Covello's acknowledgment that firearms magazines are "in common use" and have a lawful purpose are important facts that bolster the argument of opponents to gun restrictions. He also cited Covello's statement that the Connecticut law "levies a substantial burden" on the plaintiff's Second Amendment rights.

But the Hartford-based judge said Connecticut's law does not "amount to a complete prohibition on firearms for self-defense in the home."

The law does not prohibit possession of handguns, the "quintessential self-defense weapon" cited in the U.S. Supreme Court's 2008 landmark decision striking down Washington, D.C.'s ban on handguns, he said. The prohibition of assault weapons and large-capacity magazines "does not effectively disarm individuals or substantially affect their ability to defend themselves," Covello said.

The court is "reasonably certain the prohibitions do not impose a substantial burden" upon the core right protected by the Second Amendment," he said.