She campaigned on everyday issues, like reducing traffic on a congested state highway. But her victory on Tuesday was a social breakthrough that brought seasoned advocates to tears.

In a local election in Northern Virginia, Danica Roem, 33, defeated a Republican who had served in the state’s House of Delegates for a quarter of a century — and, in doing so, Ms. Roem became the first transgender person to be elected to the Virginia legislature.

Only one other openly transgender person has been elected to a state legislature anywhere in the United States: Stacie Laughton, a Democrat who won a seat in the New Hampshire House in 2012 but never took office because of an outcry over her failure to disclose a felony conviction. Another, Althea Garrison, elected to the Massachusetts House in 1992, came out as transgender during her term in office but lost every campaign she ran after coming out.

Ms. Roem and her campaign manager, Ethan Damon, did not respond to an email requesting comment Tuesday evening. But in a recent interview with Mother Jones, Ms. Roem emphasized that her campaign was about policy, not just her identity.