WASHINGTON, Pa. — Conor Lamb, a 33-year-old Marine veteran and assistant U.S. attorney, won the backing of local Democrats here in a special election to replace a Republican who resigned in disgrace over a sex scandal.

“There will be no doubt who represents the families of this district,” Lamb said after securing the Democratic Party’s nomination on the second ballot of a crowded party convention. “It’s going to be us.”

Lamb, a member of a prominent Allegheny County political family making his first bid for office, won the nomination over six rivals at a Sunday party convention. One week earlier, Republicans picked state legislator Rick Saccone as their nominee in the March 13 election, which was called after Rep. Tim Murphy (R) admitted to having an affair with a woman half his age and resigned.

Democrats, once dominant in southwestern Pennsylvania, spotted a rare opening. The 18th Congressional District, which stretches from the Ohio border past Pittsburgh’s conservative suburbs, was gerrymandered in 2011 to reelect the once-popular Murphy. In 2016, no Democrat bothered to challenge him, and Hillary Clinton won just 38.5 percent of the district’s vote.

The convention that picked Lamb gathered 554 Democratic Party committee members in this small city’s high school gym. Lamb won with 319 votes, defeating, among others, a conservative commissioner of increasingly red Westmoreland County, a Navy veteran and Veterans Affairs official, and a former teachers union president.