The House of Delegates voted for a pair of bills Thursday that codify the “castle doctrine,” which allows homeowners to use deadly force in defense of themselves, their homes and families and protects them from civil liability.

The two bills — HB14 and HB48 — passed, largely on party lines.

Democrats argued that the bills providing civil and criminal immunity for people defending themselves from others illegally in their dwellings go too far.

They also said Virginians have the right to defend themselves from intruders under centuries-old common law without writing it into state law.

The bills will head to the Senate, where legislators have passed a similar measure allowing residents to use deadly force against intruders without fear of being sued.