RICHMOND, Va. — Lawmakers in Virginia are closing a legal loophole that could charge unmarried people with a crime for having consensual sex. 

The House of Delegates passed a bill this week that aims to repeal the crime of fornication, which makes it illegal for people to have consensual sex outside of marriage. 

Currently, fornication is a Class 4 misdemeanor and carries a fine of up to $250. Del. Mark Levine, D-Alexandria, introduced House Bill 245 to repeal what he called a Victorian-era law. 

The Virginia Supreme Court declared the law unconstitutional in 2005.  

RELATED: Social media calls for more states to follow suit after Virginia passes bill to make Election Day a holiday

RELATED: Bill allowing non-U.S. citizens to get special driver's license in Virginia passes through Senate committee

RELATED: Virginia lawmakers pass bill expanding hate crimes to different groups

RELATED: Bills that aim to improve health and wellness for Virginians work their way through General Assembly