RICHMOND, Va. (AP) — Virginia lawmakers passed comprehensive anti-discrimination legislation Thursday that advocates said makes the state the first in the South to enact such protections for LGBTQ people.

The measures advanced on bipartisan votes, 59-35 in the House and 30-9 in the Senate as newly empowered Democrats continued to advance bills that Republicans blocked for years. Each chamber still must take up the other’s measure in procedural votes before the legislation can be sent to the governor, who supports it, for final approval.

While opponents have raised concerns about impacts on religious freedom, advocates praised the passage of what they called urgently needed landmark human rights legislation.

“It’s important to know that discrimination is still happening in Virginia. It is time to drive it out,” bill sponsor Sen. Adam Ebbin, who is openly gay, said at a press conference ahead of the votes.

The legislation prohibits discrimination in housing, public or private employment, public spaces and credit transactions on the basis of sexual orientation and gender identity. It also lays out causes of action that would allow individuals or, in certain circumstances the attorney general, to sue over alleged discrimination.

“It’s past time we protected LGBTQ Virginians from discrimination under the law. This bill will make us stronger and more inclusive of all — I’m proud to support it,” Gov. Ralph Northam, a Democrat, said in a statement.

WATCH: Supreme Court weighs whether LGBTQ workers are protected from discrimination

The legislation drew criticism from religious advocacy organizations that said it went too far and would effectively punish people who oppose gay marriage for faith-based reasons.

“Make no mistake, this bill is intended to dismantle religious freedom and to force the government to make everyone conform to its version of marriage and sexuality,” Republican Del. David LaRock said in a speech opposing the measure.

LaRock said the bill would punish religious people who decline work at gay weddings and would force employers and employees to use a transgender person’s preferred pronoun, an assertion that drew applause from some in the room.

Some of Virginia’s largest employers, including Capital One, Dominion Energy and Verizon, backed the legislation.

“Passing a comprehensive nondiscrimination law isn’t just the right thing to do – it’s crucial to the state economy,” those companies and more than two dozen others wrote in a letter to legislative leaders. “Because many LGBTQ and non-LGBTQ workers prefer to live and work in communities with nondiscrimination protections, such a law will give Virginia’s employers tangible advantages in recruitment and retention.”

READ MORE: Utah set to become 19th state to ban ‘conversion therapy’

The legislation also extends protections on the basis of other characteristics, including pregnancy, childbirth or related medical conditions, age and status as a veteran.

The measure would make Virginia the first state in the South to enact nondiscrimination protections for LGBTQ people, said Alphonso David, president of Human Rights Campaign, a national LGBTQ rights organization.

Democrats retook control of the General Assembly in November for the first time in a generation and have begun enacting sweeping policy changes. Lawmakers noted that similar measures have been introduced in recent years but didn’t survive in what was then a Republican-controlled body.

GOP Sen. Jill Vogel said she thought provisions of the bill addressed concerns about religious liberty and that she was proud to vote for it.

“I can assure you that if we embrace equality and protect everybody equally under the law we will be a better community,” she said on the floor.