Lawmakers in Virginia advanced a host of gun control bills Thursday, including a so-called "red flag" law to set up a procedure through which law enforcement can take firearms from someone deemed a threat to themselves or others.

Five of eight gun control bills endorsed by Democratic Gov. Ralph Northam have been approved in both houses of the General Assembly and will head to Northam for signature.

The approved measures also include allowing localities to ban certain firearms in some public places and increasing rules and restrictions around reporting lost or stolen firearms, the possession and transfer of firearms for people subject to a protective orders and recklessly leaving a loaded, unsecured firearm around a child under the age of 14.

Two other bills, one establishing a universal background check on gun sales and another limiting handgun purchases to one a month, are still being worked out between the houses of the General Assembly.

The votes come as Virginia has become the epicenter of the national debate around gun control. While Democrats took full control of Virginia's government and its policy agenda in November, it failed to pass this year one of the most restrictive measures: a ban on the sale of assault firearms.

Thousands of gun owners rallied around the state capitol in Richmond in January, demanding legislators not pass the bills and declaring their support for the Second Amendment.

The legislation has sparked impassioned crowds on both sides of the debate, and more than 100 localities symbolically declared themselves "Second Amendment sanctuaries" since November.

The resolutions say the towns, cities and counties won't enforce unconstitutional laws that violate the Second Amendment. Legal experts say these resolutions hold little weight as local law cannot supersede state law, and gun control laws similar to those advanced Thursday have been upheld in other states.

"This is a historic day for our Commonwealth, as the General Assembly has passed five common-sense gun violence prevention laws," said Kris Brown, president of gun control group the Brady Campaign to Prevent Gun Violence.

Northam and Democrats have also argued the measures will keep Virginians safer but opponents say they infringe on their Second Amendment right to bear arms.

Democrats in Virginia have moved to enact a wide range of liberal policies under their newfound control of state government for the first time since 1993.

Ratifying the Equal Rights Amendment, expanding discrimination protections for LGBT Virginians and undoing abortion restrictions have all been among the measures advanced in the General Assembly.

While Republicans have pushed back on many of the proposals, the gun control legislation has faced the fiercest opposition, and some moderate Democrats have broken from the party to vote against the bills.

Earlier this month, the Senate Judiciary Committee struck down a ban on sales of assault weapons and voted to shelve a vote on the bill until 2021 after the state crime commission studied the issue. Four Democrats sided with Republicans on the issue.

Sen. Scott Surovell, one of the Democrats who sided with Republicans in that vote, said he supported the idea of increasing regulations of assault rifles but that the bill had "numerous issues that needed to be refined."

Surovell also cited limited time in the General Assembly's legislative session and wanting to focus on "legislation that can pass this session."

The bill would ban the sales of some semiautomatic firearms and ban the possession of magazines with more than 12 rounds and some firearm accessories.

Follow USA TODAY's Ryan Miller on Twitter @RyanW_Miller