SOUTH BEND, Ind. — When Democrat Conor Lamb won a House special election last month in a Pennsylvania district that Donald Trump won by nearly 20 points in 2016, political operatives began musing about dozens of other Republican seats that could suddenly be at risk come November.

Perhaps no race has been more clearly transformed by the implications of Lamb’s win than the one in Indiana’s 2nd Congressional District, whose demographics and political sensibility closely mirror Pennsylvania’s 18th District but whose recent GOP-friendly history has kept it on the margins of the House battlefield.

Now, with three Democrats aggressively competing to become their party’s standard-bearer in the May 8 primary, the promise and peril of the Pennsylvania race is on display as party factions do battle in an increasingly sharp-edged primary.

Where Democrats see a prime opportunity to oust three-term Rep. Jackie Walorski (R), Republicans argue that, come November, not every GOP district will have a Conor Lamb on the ballot — a young, moderate former prosecutor with a political pedigree tailor-made for his Rust Belt constituency.

While Lamb was chosen at a local party convention, where insiders have more sway, the Democrats running this fall will have to emerge from primaries where a new legion of liberal activists are fueling a surge in turnout.

In Indiana, the candidate openly claiming Lamb’s centrist mantle is Mel Hall, a 64-year-old health-care executive who has played up his farm-boy roots and his time as a Methodist minister in impoverished 1980s Detroit. As of Jan. 1, he had loaned or contributed $232,000 to his campaign and raised $260,000 more — giving him a financial leg up in the race to unseat Walorski, who has $830,000 on hand.

But money alone has not bought Hall an easy path to the nomination. He is facing challenges from the left from two energetic competitors — Yatish Joshi, 67, a self-made business executive and philanthropist who has loaned his campaign $200,000 and has made a point of not soliciting contributions; and Pat Hackett, 58, a lawyer who was recruited to run by liberal activist groups that sprouted up after Trump’s 2016 win.

Where Hall rarely volunteers to critique President Trump by name and is openly courting independents and Republicans by focusing on jobs and health care, Hackett and Joshi speak more openly about resisting Trump and pursuing liberal policies such as free college and single-payer health care.

“Enough is enough,” Hackett said at a March 27 debate. “I commit to you. I will be your voice in Congress and will call this president out. And if we need to censure him or go further, we think he crosses a constitutional line, well, we will act.”

Joshi, who emigrated from India in 1976 to attend graduate school in Ohio, said in an interview he has been appalled by the anti-immigrant sentiment that has been unleashed since Trump launched his campaign.

“I don’t know that I would come to America knowing what’s happening,” he said.

Hackett, in particular, has not been afraid of criticizing her competitors. At the debate, she called out both Hall and Joshi for writing big checks in the past to Republicans and said that both candidates, as businessmen, would bring an already overrepresented perspective to Congress.

In a subsequent interview, Hackett criticized Hall for, when launching his campaign last year, answering that “the jury is still out” when asked about Trump’s presidency. “That was nine months into the administration,” Hackett said. “That’s an unacceptable response.”

The attacks from Hackett, whose campaign reported raising about $17,000, have made local Democratic officials nervous.

Jason Critchlow, the chairman of the St. Joseph County Democrats, watched the scene unfold and said afterward that he was frustrated how the race was playing out.

“My goal is to conduct ourselves in such a way that on May 9, we’re all together, whoever the candidate is, and we’re off and running,” he said. “And I feel like it’s starting to spin a little bit to a place that’s going to be hard to come back from.”

With his compelling biography and strong fundraising, Hall has gotten on the radar of national party officials and Washington political handicappers — especially after Lamb’s win.

In Pennsylvania’s 18th, a core of union-friendly Democrats in Pittsburgh’s suburbs have typically been diluted by suburban and rural Republicans in outlying counties before Lamb prevailed. Likewise in Indiana’s 2nd, Democrats in the industrial burgs of South Bend and Mishawaka tend to be swamped with Republican votes from rural counties to the south.

Voters there favored Donald Trump by 23 points in 2016, comparable to Trump’s 20-point victory in Lamb’s district. The nonpartisan Cook Political Report rates the two districts as having an identical 11-point GOP lean.

Citing those statistics, Hall’s campaign declared the race “up for grabs” in a tweet after Lamb claimed victory — assuming Hall can clinch the nomination.

Both Hackett and Joshi make a familiar liberal argument: that running unafraid to the left will get disaffected voters to the polls much as Barack Obama’s presidential campaign drove record turnout in 2008.

But Democratic officials like Critchlow see a different model — specifically, in Sen. Joe Donnelly (D-Ind.), who before the 2012 redistricting, held the 2nd District seat for three terms as an antiabortion, pro-union centrist.

“Joe Donnelly in this county wins in areas that no other Democrat wins, and I think the candidate that’s going to be successful in this district, all facts and signs point toward that’s the type of profile you need,” he said.

Hall makes his electability an explicit appeal, arguing that his message resonates in the rural counties where Democrats rarely win but where Hall believes he can pick up enough votes to keep Walorski’s margins down.

“There are a lot of Republicans in this district who are not only supportive, but they also believe that government works best when there’s not one party that controls all,” he said. “So I think there’s a path to victory that is not a long shot. It’s not like hoping for something to fall out of sky.

But Hackett, a self-described “old-school Democrat” who hearkens to the New Deal and Great Society as political touchstones, remains unconvinced and unapologetic about pursuing a more liberal path.

“I’ve been told early on, ‘Well, what really matters is . . . we have to get a Democrat elected,’” she said. “I don’t agree with that. I think our national circumstance is so serious, we better get it right. And I’m the right candidate.”