Virginia’s Democratic-held legislature voted to ratify the Equal Rights Amendment Wednesday, potentially making it the 38th and final state needed to ratify the constitutional amendment that would guarantee equal rights to all Americans regardless of sex. But questions over the original ERA ratification deadline are likely to spur a lengthy legal battle that could render the state’s move moot.

Virginia state lawmakers approved two separate, but similar resolutions that would ratify the ERA in Virginia. The move is seen as a major victory for women’s rights advocates who want to see equal rights written into the Constitution.

The measure’s passage in the Virginia Senate was greeted with an eruption of applause, smiles and tears, said Senator Jennifer McClellan, D-Richmond, one of the chief sponsors of the Senate resolution.

“I think the fact that Virginia is the 38th state is poetic justice when you think about how our Commonwealth’s history started,” McClellan told the NewsHour. “We’ve been on the wrong side of history so many times; it’s good to be the state that puts this over the top.”

Every Democratic state lawmaker voted in favor of the resolutions. Four Republicans crossed the aisle in the House to bring the vote to 59 to 41, in favor of the resolution. The Senate bill passed 28 to 12, with seven Republicans voting in favor.

Each chamber must still vote on the other’s resolution in the coming weeks but those votes are now largely a formality.

Virginia was poised to ratify the ERA last year, but Republican efforts stopped the resolution from going to a full House floor vote. November’s election flipped the state’s legislature to the Democrats in both houses, giving new life to the ERA.

“This is a historic day for women. For too long, we’ve gone without protections from gender discrimination, allowing women and girls to be treated as second-class citizens, so it’s about time Virginia was on the right side of history,” Delegate Carroll Foy, D-Prince William, who led Virginia’s House effort for the second year, said in a statement Wednesday.

But nearly 100 years after it was first written, the ERA’s path to being included in the U.S. Constitution is far from over.

Amendments to the Constitution must be approved by three-fourths of state legislatures.

The ERA passed in Congress in 1972 with a seven-year deadline for states to offer their support. The deadline was extended by three years, but when the new deadline came in 1982, the amendment was still three states short of the 38-state threshold.

Two more states ratified the ERA–Nevada in 2017 and Illinois in 2018. There is a bipartisan effort in Congress to eliminate the deadline, but it likely faces an uphill battle in the Senate.

Earlier this month, the U.S. Department of Justice issued an opinion that said the expired deadline means the ERA cannot be ratified.

“We conclude that Congress had the constitutional authority to impose a deadline on the ratification of the ERA and, because that deadline has expired, the ERA Resolution is no longer pending before the States,” Assistant Attorney General Steven A. Engel wrote. “Congress may not revive a proposed amendment after the deadline has expired.”

Proponents of the ERA argue that putting a deadline on the measure in the first place might not have been legal.

“There is no legal basis for a deadline, even if there was, it wasn’t done correctly,” McClellan said. “And if Congress did put a deadline in, they can remove it. The Department of Justice and the National Archivist have no role in the amendment process. Congress passes the resolution and 38 states ratify it, we’ve done that.”

Kate Kelly, an attorney for the advocacy group Equality Now, said the amendment could still move forward if the courts to declare the deadline invalid.

Procedurally, Virginia’s ratification will be sent to the National Archives and Records Administration. The archivist must certify that the amendment is valid and has become part of the Constitution, but the DOJ’s decision will now effect that process.

“The [Office of Legal Council at the DOJ’s] opinion is not binding. It is just that – an opinion from the Trump Administration,” Kelly said. “The OLC cannot bind Congress nor the Courts. The only impact the OLC will have is on the National Archivist, who is part of the administration. He will now be unwilling, and unable to officially certify the ERA as an amendment until the deadline issue is resolved. That’s it.”

But other states with Republican-controlled legislatures that previously passed the ERA, namely Legislators Idaho, Kentucky, Nebraska, Tennessee and South Dakota, have attempted to revoke their ratifications.