Last Tuesday night was a good one for Democrats, who won several hotly contested races and increased their numbers in several states. But it was also a good night for young candidates, who ran in hundreds of races as both Democrats and Republicans.

Young Democrats, in particular, had a strong showing. (Millennials strongly lean toward the Democratic party by a margin of 57 percent to 36 percent.) At the state level, Vin Gopal (age 32) won a New Jersey state Senate seat, while Jennifer Carroll Foy (36), Chris Hurst (30), Danica Roem (33), Schuyler Van Valkenburg (32) and Jerrauld Jones (28) all won seats in the Virginia House of Delegates. Emily Brewer and Will Morefield, both 33-year-old Republicans, also got elected to the Virginia House.

That’s not counting the hundreds of local races across the country where young people from both parties were serious contenders, like Derek Dobosz, 21, and Joel McAuliffe, 25, who both earned spots on the city council in Chicopee, Mass.

Though hard numbers are difficult to come by, political scientists and nonprofiteers across the country say young people's interest in running for office has surged, on both sides of the aisle, and Donald Trump's presidency appears to be a big reason why.

Emerge America, a training and recruitment organization that focuses on Democratic women, saw an 87 percent increase in signups for their workshops this year compared to last. Among women that were 35 or younger, there was a 60 percent increase, according to Allison Abney, a spokesperson for the organization.

Matthew Oberly, press secretary for the Young Republican National Federation, says that he's noticed increased excitement and willingness from young Republicans to run for office -- a trend that he pins partially on the success of Trump's campaign last year.

"Trump has enabled young Republicans to feel an energy that pushes them forward in wanting to run and wanting to make a difference," he says. "The energy behind a candidate has not been so high in a long time."

The enthusiasm doesn't seem to be slowing, either.

Run for Something, an organization that helps recruit and train progressive millennials to run in down-ballot races, launched on Inauguration Day this year with the expectation that it would recruit and train about 100 millennial candidates in its first year. Instead, it got 1,000 recruits in its first month and 12,000 over the course of the year so far, says co-founder Amanda Litman. Since Election Day last week, the organization has seen an average of 100 new signups per day -- 10 times its normal rate.

“[Young] people are angry. They’re pissed that government isn’t running for them, that governments are putting other interests first,” says Litman. “And they feel like, if Trump can win a race, then so can I.”

In last week's election, Run for Something officially endorsed 72 candidates -- 32 of whom won their races, according to Litman.

But the trend toward younger candidates isn't exclusively motivated by Trump or a desire to push progressive policies.

She Should Run, a nonpartisan organization that encourages women to run, has seen an influx of thousands of women interested in running for office as both Democrats and Republicans. Its CEO, Erin Loos Cutraro, recently told CityLab, "I reject the theory that this is about progressive women. I think it’s about women."

Plus, it's inevitable that the political landscape will start to see more and more millennials as members of that generation enter their 30s.

When millennials do run, there's evidence that they prefer state and local races because it allows them to avoid the acrimony and gridlock that have stalled Congress and brought its approval to historic lows, says Shauna Shames, an assistant professor at Rutgers University and author of Out of the Running: Why Millennials Reject Political Careers and Why it Matters.

“The young people I talked to [for the book] are more interested in running at the local level, and then the state level, before they would ever think about anything federal,” she says. “They feel like [locally] they would be able to see the changes they’re making, and they also talked about connection to their constituents. They feel that at the national level they’re too far away from the people they serve.”

The millennial winners of last week’s races appear to agree with Shames.

“I’m really trying to emphasize a back-to-basics governing philosophy. There isn’t a Republican or Democratic way to build a bridge or lay down water pipes,” says Danica Roem, who is also the first openly transgender person to serve on a state legislature.

She defeated Republican incumbent Bob Marshall, who authored a transgender bathroom bill in Virginia and who has called himself the state’s “chief homophobe.” Still, she ran her campaign focused almost exclusively on infrastructure issues, particularly easing congestion along Route 28.

“I remember having to wait until 6 or 7 at night at school for my mom to pick me up [because traffic congestion was so bad], and 25 years later, things are still exactly the same,” says Roem. “Meanwhile, I saw Delegate Marshall focusing on these divisive social issues. Let’s focus on building our infrastructure instead of turning on one another."

Dobosz, the newly-elected 21-year-old city councilman in Chicopee, Mass., also says partisanship was drastically less important in his race than one might expect. He ran as a Democrat in a deeply conservative ward, but he says that made almost no difference to people.

“For a city councilor, people just want to know, is this guy going to respond to our phone calls?” he says. “If I didn’t talk to someone, maybe they would be more likely to vote party line. But if I spoke to them, then it’s just not their concern.”

For Emily Brewer, a Republican delegate-elect to the Virginia House, party affiliation was a strong part of her race, but not the whole picture. Her biography as an adoptee, a small business owner and a member of a rural community made up a considerable portion of her platform.

"I'm from a rural community, and a lot of people I grew up with have left because there just aren't enough opportunities," Brewer says. "That's what really inspired me to run in the first place -- those problems in my own community."

Millennials are still drastically underrepresented in government, particularly at the national level, where they hold only five congressional seats. They also hold only about 5 percent of seats in state legislatures. But a confluence of forces -- Trump’s election, frustration with the status quo and a renewed belief in the efficacy of state and local government -- could be encouraging greater participation from a generation that now outnumbers the baby boomers.

“I have a sense that there are some people now who understand that democracy only works when good people run for office,” says Shames. “The catastrophic collapse of good policy at the national level made very clear to a lot of young people that democracy can be dangerous.”