SEATTLE -- Washington on Tuesday joined a handful of other states that ban anyone under 21 from buying a semi-automatic rifle after voters passed a sweeping firearms measure in November that has drawn a court challenge from gun-rights advocates.

The ballot initiative seeks to curb gun violence by toughening background checks for people buying assault rifles, increasing the age limit to buy those firearms and requiring the safe storage of all guns. Only the age-limit portion of the measure goes into effect on Jan. 1; the rest becomes law on July 1.

Kristen Ellingboe, a spokeswoman for the Washington Alliance for Gun Responsibility, said the initiative was one of the most comprehensive gun-violence prevention measures to pass in the United States. It specifically targeted "semi-automatic assault rifles" in response to mass shootings across the country, she said.

"We've seen that assault rifles are the weapon of choice for mass shootings, and when they're used, more people are killed and injured," Ellingboe said.

Fifty-nine percent of Washington voters approved Initiative 1639 in the Nov. 6 general election.

"We've see time and again that Washington voters want action to prevent gun violence in our state," Ellingboe said. "They showed that again by supporting 1639 by a wide margin."

Opponents have sued to block it.

"Starting today, young adults between the ages of 18 to 20 will have their rights to purchase semi-automatic rifles stripped away," said Dave Workman, a spokesman for the Bellevue, Washington-based Second Amendment Foundation.

The federal lawsuit says the measure violates the Second and 14th amendments of the Constitution as well as gun sellers' rights under the Commerce Clause.

Read more from our friends at the NRA