Want the best of VICE News straight to your inbox? Sign up here.

It turns out spending time in jail after allegedly having a sexual relationship with a teenager doesn’t mean your political career is over.

Former Virginia delegate Joe Morrissey handily defeated the incumbent, state Sen. Rosalyn R. Dance (57% to 43%) in Tuesday’s primary. In the process, he also secured the seat for himself, because the November ballot won’t have a Republican challenger. Morrissey’s triumph, despite his scandal-laden past, signals a growing resentment of establishment Democrats in the state.

The former defense lawyer who lost his law license spent time in jail back in 2015 after he pleaded guilty to a single count of contributing delinquency to a minor. Prosecutors in the case said that Morrissey, then 56, was having sex with his 17-year-old receptionist. (The two are now married with children.)

Morrissey could have spent up to 41 years in prison. The age of consent in Virginia is 18, and he faced numerous felony charges — such as the possession and distribution of child pornography based on nude images on his phone. (Morrissey’s legal team claimed that a jealous friend of his future wife planted the images on his phone.)

Morrissey’s victory in the face of a sex scandal is not an anomaly. After all, the president of the United States has been publicly accused of — and even sued for — sexual misconduct by numerous women. A 2018 VICE News review found that 16 state lawmakers who were publicly involved in sexual misconduct scandals won their primaries and advanced to the November general election.

Morrissey, who’s white, heavily relied on support from Virginia’s black community, to unseat Dance, who’s black, in Wednesday’s primary, according to the Washington Post. Dance had broad support from big-name Democrats, including U.S. Sen. Tim Kaine. Dance also had a close relationship with Gov. Ralph Northam, who faced a scandal of his own earlier this year after a photo in his med school yearbook featured man in blackface next to someone in Klan robes.