Driven by high Democratic turnout, Tuesday was an election of historic “firsts,” as voters across the country elected several openly transgender or gay people, as well as other barrier-breaking candidates, to local and state offices.

Democrats of all ages and backgrounds went to the polls, motivated in large part by the election of President Donald Trump. But it was the turnout of one group in particular — younger voters — that may have helped propel candidates like Danica Roem in Virginia, who became the first transgender person in the United States to win a state legislative seat.

LGBTQ advocates cautioned that it was difficult to read into voters’ motivations in backing Roem and other Democrats, like Andrea Jenkins in Minneapolis, the first African American transgender woman to win a race for a major city council seat.

But several said it was likely not a coincidence that enthusiasm seemed up among younger Democrats in an election that reflected a shift in attitudes about gay and transgender people in power.

“We are seeing more and more young people who have transgender friends, who have friends whose parents are transgender, or know someone who’s transitioning in their community,” said Rebecca Kling, an official at the National Center for Transgender Equality. Many Americans are “more familiar with trans identity and what it means to be transgender,” Kling added.

Tuesday’s elections proved that as a new generation of Americans reaches voting age, the “more support there is for LGBT issues” overall, said James Parrish, the executive director of Equality Virginia, a nonpartisan advocacy group. “It’s a demographic that we’ve been waiting to come of voting age.”

Virginia offers a good example of the way these cultural changes are impacting elections.

The winner of the state’s closely watched governor’s race, Democrat Lt. Gov. Ralph Northam, received 1.4 million votes, roughly 400,000 more votes than Democrat Gov. Terry McAuliffe got in 2013, according to state turnout figures. Northern Virginia, where Roem beat state Del. Bob Marshall — a veteran Republican incumbent and self-proclaimed “chief homophobe” — saw the biggest jump in Democratic voter turnout from four years ago.

And while a detailed breakout of voter turnout by age was not yet available Wednesday, exit polls showed Northam won a larger share of younger voters than Hillary Clinton did in the 2016 presidential race.

Northam beat his Republican opponent Ed Gillespie by 39 points among Virginia voters aged 29 and younger, an eight-point increase over Clinton’s showing nationally among younger voters.

Senna Ahmad, 25, a graphic designer from Gainesville, Va., said her number one reason for voting for Roem was the candidate’s support for a proposed mosque in Prince William County. “It resonated to see minorities supporting minorities,” Ahmad said, recalling Roem’s appearance at a public hearing on the project. “Because she showed up for us, I wanted to show up for her.”

Ahmad also said she wanted to send a message to Trump, whose divisive rhetoric on race and cultural issues has angered Democrats and Republicans.

Since Trump’s election, “you see a lot of hate coming out in the open that wasn’t there before,” Ahmad said. “I think one of the reasons young people came out [on Tuesday was] to show that this is something we’re against.”

Angela Vang, a sophomore at the University of Minnesota in Minneapolis and St. Paul, cheered Jenkins’ breakthrough election to the Minneapolis city council. “The fact that we elected the first African American trans woman to city council is amazing,” said Vang, 19, who is a member of her university’s Women for Political Change group.

But Vang said she thought Jenkins’ race and gender did not define her campaign, especially for younger voters whose primary focus were issues like affordable housing and criminal justice.

Sentiments like those reflect a growing sense that younger voters don’t fixate on gender, race and sexual orientation in making their political decisions. They also mirror trends in the public’s acceptance of homosexuality, according to a Pew study on political polarization released last month.

Tuesday’s elections reflect a growing sense that younger voters don’t fixate on gender, race and sexual orientation in making their political decisions.

The Pew poll found that 83 percent of Americans age 18 to 29 said homosexuality “should be accepted by society,” compared to 58 percent of people age 65 and older who felt the same way. Pew released new data Wednesday showing a significant gap in views on transgender issues between Republicans and Democrats.

Yet despite these differences, Kling argued the country was undergoing “a shift from the idea of LGBT identity, or trans identity specifically, being the only thing people care about in candidates or political positions.” Now, Kling said, it’s become “just one part of their political identities.”

Roem in Virginia exemplified this approach, said Gregory T. Angelo, the president of Log Cabin Republicans, the nation’s leading conservative LGBT advocacy group.

“Her victory was unquestionably historic,” Angelo said. “What’s interesting to me is she made history without even trying.” By focusing on issues like transportation and infrastructure, “she never ran as the trans gender candidate for the Virginia House of Delegates,” he said.

Republicans like Marshall, Roem’s vocal anti-LGBTQ opponent, should take notice, he added.

“Bob Marshall presents a cautionary tale for the GOP,” Angelo said. “There is very little appetite among the general electorate, and among a growing number of voters in the Republican Party, to endlessly litigate LGBT culture wars.”

Saher Khan contributed reporting.