Two years ago, a historic number of women, including the state’s first openly transgender lawmaker, won seats in Virginia’s House of Delegates.

And on Tuesday night, female candidates helped turn the state legislature Democratic for the first time in 20 years. Female Democrats held onto their seats from 2017, and newcomers like Ghazala Hashmi, the first Muslim woman elected to the Virginia legislature, flipped key seats to help give Democrats a majority in both the House of Delegates and the state Senate.

Not all the Democrats to pick up seats on Tuesday were women — Democrat Clint Jenkins, for example, beat longtime incumbent Del. Chris Jones for control of a district based in Suffolk, Virginia. That district was one of those redrawn ahead of this election after a court determined the districts had been racially gerrymandered.

But the success of female candidates on Tuesday has the potential to continue a transformation of the legislature that many say has been underway since women’s 2017 victory, including a renewed focus on issues like sexual harassment prevention and anti-discrimination protections. Virginia also sends a message for Democrats in 2020: Despite concerns about “electability,” women can and do win.

Elections this year “are important because they will show us the mood of the country, especially heading into a presidential election year,” A’shanti Gholar, political director of Emerge America, a group that backs Democratic women, told Vox on Tuesday. And in Virginia, the number of female candidates shows “people are looking to women for leadership,” she said.

Women made history in Virginia in 2017. They did it again in 2019.

The 2017 election was a historic one for Virginia in many ways: in addition to electing the first openly trans lawmaker, Danica Roem, voters also chose the first Latina delegates, Elizabeth Guzman and Hala Ayala, and the first female Asian American delegate, Kathy Tran. Overall, a record 28 female delegates were sent to legislative chamber, and all but one of the female newcomers were Democrats who took over Republican seats.

However, Republicans retained majorities in both the House of Delegates and the state Senate. On Tuesday night, that changed — and female candidates were a significant part of the shift. Republicans had hoped that they might win back some of the seats they lost in 2017, according to the Hill, but all 15 newcomers from that year, including 11 women, held onto their seats.

And newcomers like Hashmi, who enters the state Senate, notched key victories last night. The former professor and immigrant from India told the Times that she decided to run for office after Trump announced his travel ban on people from Muslim-majority countries.

“I didn’t know if I actually had a home in this country,” she told the paper. “My anxiety was caused by wondering if other people would speak up and support the assault we were seeing on civil liberties.”

Another woman to pick up a seat was Shelly Simonds, who lost her election in 2017 when her opponent’s name was pulled from a hat after votes ended in a tie. This year, she came back to beat him.

Overall, women in Virginia set a new record in 2019, with 41 seats in the state legislature, including 30 in the House of Delegates.

Of course, the fact that there are 140 seats total in the legislature suggests that women have a way to go to reach parity. But the historic number of women elected in 2017 have already had an influence on Virginia politics. Female delegates from opposing parties disagreed over how to implement a sexual harassment policy for the legislative chamber, according to the Washington Post, but the state House still ended up instituting its first sexual harassment training program.

Meanwhile, the House did not take up new restrictions on abortion, thanks in part to the fact that Roem replaced an adamantly anti-abortion Republican man, reported the Post.

Now, with a Democratic majority, the state legislature could pass a raft of legislation affecting women, LGBTQ Virginians, and others, including legislation to codify the right to an abortion in state law in case Roe v. Wade is overturned; state ratification of the Equal Rights Amendment, which would guarantee equal rights to people of all sexes in the US Constitution; and measures to ban discrimination based on sexual orientation or gender identity.

It’s a reminder, going into 2020, that women are “electable”

Tuesday’s election also has implications beyond Virginia. The state got a lot of attention in this “off-off-year” election because it was the only one where the state legislature had the potential to flip, as Schneider and Laura Vozzella reported at the Post. It’s also a Southern state that went for Hillary Clinton in 2016, so Democrats see it as key to their strategy to beat Trump, Schneider and Vozzella write.

Clinton’s win was instructive for Emerge America, Gholar told Vox. The group looked at districts where Clinton had won the presidential election, but where the state legislative seats were held by Republican men. Because of Clinton’s victory, Emerge knew “the people in the district would vote for a woman, and we really wanted to make sure that they had great, talented women who wanted to serve the community to vote for,” Gholar said.

The fact that so many of those women won — and more picked up seats on Tuesday — is a counterweight to a persistent narrative that women aren’t “electable” when they run for office. That narrative got its latest support from a recent New York Times/Siena College poll that showed former Vice President Joe Biden, but not Sen. Elizabeth Warren, beating President Trump in several battleground states.

In the poll, 41 percent of people who said they’d vote for Biden but not Warren said they thought most women who run for president “just aren’t that likable.”

“There’s just something about her that I just don’t like,” one female voter told the Times of Warren. “She’s very cold. She’s basically a Hillary Clinton clone.”

Virginia was not one of the states included in the poll. But voters there, at least, were more than willing to cast their ballots for women on Tuesday.

Of course, research has already shown that women running for Congress are just as likely to win as men are. There’s just no research like that at the presidential level because, so far, the sample size of female presidential nominees from a major party is precisely one.

But for Gholar, Virginia is evidence that Democrats shouldn’t be scared to run female candidates. “When people are saying ‘electability, viability,’” she said, “what you’re really saying is straight, white man.”

And a lot of straight, white men lost in Virginia on Tuesday.