Democrats claimed victory Wednesday in the close Pennsylvania special election for Congress, but one loser could be emerging: House Minority Leader Nancy Pelosi, who is becoming a liability to Democrats on both sides of the party’s ideological spectrum.
Conor Lamb, who was leading the Pennsylvania race by a superthin margin over Republican Rick Saccone, pledged not to support Mrs. Pelosi as the House Democratic leader.
“We need to sweep some new people in there,” he said.
“I have said, and I continue to say, that I think we need new leadership at the top of both parties in the House,” Mr. Lamb said Wednesday on MSNBC’s “Morning Joe.” “I just think that the leadership of both parties have presided over a time when we’ve had more and more gridlock and fewer and fewer important things getting done.”
Mrs. Pelosi’s team rejected the idea that Mr. Lamb’s opposition is a symbol of a broader break in the party and expressed doubt that a flood of Democrats would be rushing to distance themselves from her.
“I see no evidence of that whatsoever,” said Drew Hammill, a spokesman for Mrs. Pelosi. “She has had this sort of thing throughout her career. There have always been people challenging her. This is the nature of this place.”
All sides looked for broader meaning in the special election to fill a seat left vacant by a scandal-tainted Republican who quit.
While full results may not be known for days as absentee and provisional ballots are tallied, Mr. Lamb and fellow Democrats were claiming victory. Mr. Lamb led with 113,813 votes to Mr. Saccone’s 113,186 votes. A Libertarian candidate had 1,379 votes.
Democrats said Mr. Lamb’s victory was trouble for President Trump, who carried the district by 20 percentage points in 2016.
“This shows that Democrats can win everywhere,” Tom Perez, chairman of the Democratic National Committee, said on CNN. “These were basically Obama-Trump voters who came back to the Democratic Party.”
“This is not an aberration,” Mr. Perez said. “This is a trend.”
The White House brushed aside such speculation, saying Mr. Trump helped keep the race closer than it would have been otherwise.
“The president’s engagement in the race turned what was a deficit for the Republican candidate to what is essentially a tie,” said White House deputy press secretary Raj Shah. “Also, the Democrat in the race really embraced the president’s policies and his vision, whereas he didn’t really embrace Nancy Pelosi, the Democratic leader.”
Mrs. Pelosi’s team said she wasn’t a factor in the race and pointed to a Monmouth University Polling Institute survey that showed repeated attempts by Republicans to tie Mr. Lamb to Mrs. Pelosi didn’t matter.
“There doesn’t seem to be any evidence that this moved anybody,” Mr. Hammill said.
But Patrick Murray, director of the Monmouth poll, said results were more a reflection of Mr. Lamb’s success in convincing voters he wasn’t backing Mrs. Pelosi, not that she wasn’t a liability.
“He was able to overcome that because he purposely distanced himself from Nancy Pelosi, and our polls showed he did get a bump because he said he would not support Pelosi for leader.”
Mr. Murray figured that as much as 2 percent of Mr. Lamb’s support came from voters who were marginal but swung to him because he was able to distance himself from Mrs. Pelosi.
“That is clearly within the margin of victory,” he said.
Known as a prolific fundraiser, Mrs. Pelosi has led the House Democratic Caucus since late 2002. She became the first female House speaker in 2007 but gave up the gavel after the Republican takeover in 2010 elections.
She managed to hang on to her leadership after turning back a challenge from then-Rep. Heath Shuler in 2010 on a 150-43 vote.
After Mr. Trump’s election victory in 2016, she faced a challenge from Rep. Tim Ryan of Ohio, who said the party under Mrs. Pelosi had become too coastal and needed to put greater focus on the working class in the Rust Belt and flyover country. Mrs. Pelosi won again, by a 134-63 vote margin.
On Wednesday, Mr. Ryan said he hoped Mr. Lamb’s election would encourage more Democratic candidates to break with their party’s leaders.
“At the end of the day, our candidates need to determine what their positions are on the major issues, including the issue of leadership,” Mr. Ryan told reporters on Capitol Hill. “I think that is the takeaway from Conor. He was not going to be influenced by anybody from the outside, and that plays well.”
That is already happening in Kansas, where Democrat Paul Davis is running for the open seat in the state’s 2nd Congressional District and has long held that Mrs. Pelosi must go.
Meanwhile, the crowd roared with approval at the Democratic debate last month in Arizona when the forum moderator asked the six candidates running for the open seat in the 2nd Congressional District whether they would support Mrs. Pelosi for speaker and no one raised a hand.
The group included former Rep. Ann Kirkpatrick, who later reversed course after saying she did not hear the question. She said she would support Mrs. Pelosi, who has raised money for her campaign.
Mr. Hammill said running against Mrs. Pelosi did not prove to be fruitful for Jay Hulings, who finished fourth last week in the race for the Democratic nomination in Texas’ 23rd Congressional District.
Rick Trevino, a former teacher from San Antonio, did advance and has come out against Mrs. Pelosi. He suggested the party needs a more liberal leader like Rep. Keith Ellison of Minnesota.
Mr. Murray, the pollster, said Mr. Lamb’s victory could be a sign of more changes.
“It seems like the writing is on the wall because even Democrats in safe districts who have been her allies at times are sending signals that Nancy Pelosi will no longer be the next leader in the Democratic Caucus whether or not Democrats take control or not,” Mr. Murray said.
Indeed, Rep. Bill Pascrell Jr., New Jersey Democrat, told The Atlantic last month, “I would expect that we would have, win or lose, new leadership by Jan. 1, 2019.”
“She would love nothing more than to win, and then she’ll get out,” Mr. Pascrell said of Mrs. Pelosi.
• Tom Howell Jr. contributed to this article.