RICHMOND, Va. (AP) — Democratic lawmakers in Virginia are advancing legislation to ban the sale of assault weapons and the possession of high-capacity magazines.

The state House voted 51-48 Tuesday to pass the legislation to prohibit the sale of certain semiautomatic firearms, including popular AR-15 style rifles, and ban the possession of magazines that hold more than 12 rounds.

The legislation is a top priority for Gov. Ralph Northam and now moves to the Senate, where it faces an uncertain future. Several moderate Democrats have indicated they are unlikely to support the measure.

Supporters say the legislation is needed to help prevent mass shootings. Opponents said the legislation would turn law-abiding gun owners into criminals for having commonly available guns and accessories.

Heated debates over guns have dominated this year’s legislative session, as Virginia has become ground zero in the nation’s raging debate over gun control.

With a full majority at the state house for the first time in a generation, Democrats this year have already advanced a number of gun control measures. Those include limiting handgun purchases to once a month; universal background checks on gun purchases; and a red flag bill that would allow authorities to temporarily take guns away from anyone deemed to be dangerous to themselves or others.