A bill backed by Gov. Ralph Northam that would ban the sale of assault-style weapons in Virginia failed on a committee vote Monday morning, setting back one of the biggest priorities for the newly minted Democrat-controlled government in the state.

A crowd of gun-rights activists packed into the committee room cheered as the vote came in, with four moderate Democrats joining Republicans to shelve the bill until next year. Heated exchanges over guns have dominated this year's legislative session. They were also a key topic of last year's legislative elections – particularly after a mass shooting in Virginia Beach claimed a dozen lives – and gun control groups heavily funded Democratic candidates.

Gun-rights protesters have been out in force for weeks in Richmond, Va., the state's capital, over Democrats' gun control agenda.

WEST VIRGINIA LAWMAKER INVITES VIRGINIA COUNTIES TO JOIN HIS STATE AMID GUN CONTROL PUSHBACK

"I have friends that are not going to comply," warned Nicholas McGraw, a gun owner from King William County who came to protest the assault weapons bill on Feb. 7, before the measure died.

McGraw's comments reflected the attitude of many conservatives and Second Amendment activists in Virginia, especially in its more rural areas. More than 100 Virginia cities and counties have declared themselves to be sanctuary jurisdictions for gun rights since Democrats, led by Gov. Northam, took control of the state's government.

MORE THAN 100 VIRGINIA CITIES, COUNTIES DECLARE THEMSELVES SANCTUARIES AS DEMS PREPARE TO TAKE LEGISLATURE

Such "sanctuaries" would order local law enforcement not to enforce state gun laws.

But proponents of the assault weapons bill said that they would take the setback in stride.

"While we are disappointed in today’s vote, we are undeterred. Assault-style weapons, large-capacity magazines, and other accessories designed to heighten the lethality of firearms have no place in our communities," Kris Brown, President of Brady United Against Gun Violence, said in a statement. "In the meantime, the Judiciary Committee and Virginia Senate must swiftly pass the remaining seven, common-sense gun violence prevention laws before them. We need the action that voters demanded in November."

Before the bill failed, Virginia Secretary of Public Safety and Homeland Security Brian Moran underscored the resolve some Democrats have to get an assault weapons ban done. He said Americans do not have a right to own such firearms under the Constitution.

"Assault weapons are not protected by the Second Amendment because they are weapons of war," Moran said.

CLICK HERE TO GET THE FOX NEWS APP

Other gun control bills have, however, made it through the Virginia House and Senate. These include measures that would ban guns in certain areas and buildings, require universal background checks, limit how frequently people can buy handguns and allow law enforcement to temporarily take guns away from someone they deem dangerous.

Whittney Evans, a reporter for myVPM, a local NPR affiliate, reported that Democratic Sen. Louise Louis said, "you bunch of wimps," after the vote results came in. The assault weapons bill, which was more moderate than previous proposals to outright ban possession of assault rifles or force owners to register them with police, could not get the moderate Democrats needed in order to pass.

The Monday vote tasks the state crime commission with studying the issue as the legislature puts off any action on assault weapons until at least 2021. Virginia's legislative session will end on March 7.

Fox News Barnini Chakraborty, Sam Dorman and the Associated Press contributed to this report.