A transgender Virginia politician has been elected to the state legislature, unseating one of the state’s longest serving and most socially conservative lawmakers.

The Democrat Danica Roem, a former journalist for the Gainesville Times, beat the Republican Bob Marshall, who sponsored a bill this year that would have required transgender people to use bathrooms corresponding with the sex on their birth certificate.

David Toscano, the Democratic leader in Virginia’s house of delegates, said: “It’s historic ... It sends a message to politicians everywhere that the politics of bigotry is over.”

In a good night for diversity in US politics, Andrea Jenkins clinched the ward eight Minneapolis city council seat, becoming the first transgender person to win such a seat in a major city, and Ravinder Bhalla became the first Sikh mayor of Hoboken, New Jersey, despite an aggressive campaign that turned ugly when he was labelled a terrorist in flyers.

Overall, Democrats did well in key contests on Tuesday night. Ralph Northam decisively beat Ed Gillespie in the Virginia governor race, and in New Jersey, Phil Murphy romped to victory against the state’s incumbent lieutenant governor, Kim Guadagno.

Roem will be the first transgender member of the house of delegates and the second trans woman to be elected to a statehouse. Althea Garrison, a black woman who won as a Republican in Massachusetts in 1993, was the first.

Roem discussed her gender identity during the campaign, but focused more on jobs, schools and northern Virginia’s traffic congestion.

The Democrat underwent therapy to begin her gender transition when she was 28, and said in an interview earlier this year that politics should be inclusive of all.

“No matter what you look like, where you come from, how you worship or who you love, if you have good public policy ideas, if you’re qualified for office, you have every right to bring your ideas to the table,” Roem said.

Roem also argued that Marshall, who has served in the House since 1992, spent too much time on social policy. He was the author of a now-void constitutional amendment that defined marriage as between a man and a woman, and sponsored a bill banning gay people from openly serving in the Virginia national guard.

Roem has played in a heavy metal band, Cab Ride Home, since 2006. The quintet, with Roem roaring vocals over high-speed, chugging guitars, has independently released four albums, supported metal bands such as Cannibal Corpse and Amon Amarth, and toured the UK in 2012.

The band describe their style as “drunken thrash metal” and say on their Bandcamp page: “Cab Ride Home represents one thing: partying ... Our songs are about drinking and our shows are about raging.”

“Just because I sing in a heavy metal band while spinning my head in circles and getting paid to do it, why can’t I run for government?” Roem told Noisey earlier this year. “[Metal is] not just what you listen to in your car on the way home. The lyrics inspire part of your life. The music tells your story.”