RICHMOND, Va. (WRIC) — A bill adding language in the state code legalizing same-sex marriage passed in the Virginia Senate with a bipartisan vote.

The proposal would insert a new section in the Virginia code clarifying that a marriage between two people is legal regardless of their sex.

The bill introduced by state Sens. Adam Ebbin (D-Alexandria) and Jennifer Boysko (D-Loudoun) would give religious organizations and clergy members the right to refuse to perform any marriage.

The 40-member chamber voted 25-12 to pass the measure, with three Republicans siding with Democrats: State Sens. Siobhan S. Dunnavant (Henrico), David R. Suetterlein (Roanoke) and Jill Holtzman Vogel (Fauquier).

Sen. Ebbin, the first openly gay person elected to the General Assembly, went to Twitter to celebrate the bill’s passage in the Senate.

“SB 1096, my bill ensuring that Virginians have the right to marry who they love regardless of their sex, has passed the Senate on a bipartisan vote,” Ebbin tweeted Tuesday.

Sen. Boysko said she was proud to be a chief co-patron of the bill, tweeting that “We parents want to walk our LGBTQ+ children down the aisle too!”

While the proposal picked up support from Republicans, how it will fare in the GOP-controlled House of Delegates is unknown. Last year, a Republican-controlled subcommittee killed an effort to remove Virginia’s defunct ban on same-sex marriage from the state constitution.

A renewed push for the constitutional amendment from Ebbin and other state lawmakers, including a Republican, is currently making its way through the legislature.

If passed by the General Assembly two years in a row, Virginians would vote on whether to strike outdated language that defines marriage as “only a union between one man and one woman” from the constitution.

In 2006, Virginia voters approved a constitutional amendment that banned same-sex marriage. A panel of the 4th Circuit Court of Appeals struck down that ban in 2014 and the U.S. Supreme Court ruled that same-sex marriage is a right guaranteed under the Constitution in 2015.

Despite the state’s now-defunct ban, it does not impact the legality of gay marriage in Virginia after the 2015 U.S. Supreme Court decision in Obergefell v. Hodges.

But concerns about the high court possibly reversing the decision guaranteeing same-sex marriage escalated after the overturning of Roe v. Wade. In December, President Joe Biden signed the Respect for Marriage Act to protect same-sex marriage rights.