The stage was set, as it often was in New Jersey politics.
The Democratic machine that had kept Senator Robert Menendez in power had abandoned him, and into the spotlight stepped Tammy Murphy, the state’s first lady, who had decided to run for his seat.
She quickly amassed support from Democratic Party leaders in the state’s largest counties, bestowing an air of inevitability to her candidacy soon after she entered the race in November.
But on Sunday, she abruptly ended her campaign. It was a tacit acknowledgment that she and her husband, Gov. Philip D. Murphy, had grossly miscalculated voter sentiment as they made a play for a coveted seat at a high-stakes moment in history. Ms. Murphy’s flop also reflected intense national frustration with politics as usual — energy that her chief rival successfully tapped.
“The machine overplayed its hand,” said Uyen Khuong, the director of Action Together New Jersey, a nonpartisan volunteer group that advocates voting rights.
“When they tried to shove the candidacy down voters’ throats,” Ms. Khuong said about the first lady’s Senate bid, “they went too far.”
Ms. Murphy’s exit leaves Andy Kim, a 41-year-old congressman from South Jersey, as the odds-on favorite to be elected in November. If successful, he would be the country’s first Korean American senator and one of the Senate’s youngest members.
After Ms. Murphy, 58, quit the race, supporters of Mr. Kim began sharing lyrics from the Patti Smith anthem “People Have the Power” and the musical “Les Misérables” in an online chat group.
“Seems like she heard the people sing,” one supporter wrote.
“Singing the song of Andy Kim,” another chimed in.
There is no doubt that Mr. Kim encouraged and benefited from the anti-machine backlash that has stemmed from the sensational bribery charges against Mr. Menendez, who has represented New Jersey in Congress since 1993.
Ms. Murphy’s candidacy was heavily reliant on much of the same party machinery that propelled Mr. Menendez, including the unique design of the state’s primary ballots, which give prominent placement to Democratic and Republican leaders’ preferred candidates.
Mr. Kim has asked a federal judge to force the state to redesign the ballot before the June 4 primary to make it more fair to outside candidates. The judge’s decision could come as early as this week.
But Ms. Murphy’s first campaign for office was also seen as deeply flawed, even by onetime allies.
Her campaign manager left the job after a series of missteps. A prominent supporter, Steven Fulop, the mayor of Jersey City, rescinded his endorsement of Ms. Murphy, noting his disappointment in her campaign. She was persistently roasted on social media, where supporters of Mr. Kim wasted no opportunity to remind Democratic primary voters that the first lady had been a Republican until she was 49.
And while Ms. Murphy’s fund-raising had outpaced Mr. Kim’s, there were signs that her lackluster poll numbers were taking a toll. By the end of last month, a super PAC established to support her candidacy had received less than $1 million in donations from just 18 people or groups, federal election records show.
Ms. Murphy would have been the first woman ever elected to the Senate from New Jersey, a history-making possibility she emphasized. But even that potentially energizing rationale was dented when an outspoken female labor leader, Patricia Campos-Medina, entered the race, too.
Chris Russell, a Republican campaign strategist, likened Ms. Murphy’s experience to the race her husband ran for re-election in 2021.
“I think they thought that was going to be a walk in the park, and they thought this was going to be a walk in the park,” said Mr. Russell, who helped lead the campaign of Mr. Murphy’s Republican opponent, Jack Ciattarelli, who came within 3 percentage points of winning. “In both instances, they were dead wrong.”
People close to Ms. Murphy’s campaign said that any path to victory most likely would have involved using millions of her own dollars to buy television airtime to attack Mr. Kim.
She rejected that approach.
“It is clear to me that continuing in this race will involve waging a very divisive and negative campaign, which I am not willing to do,” she said in a video that announced the end of her campaign.
“With Donald Trump on the ballot and so much at stake for our nation, I will not in good conscience waste resources tearing down a fellow Democrat,” she added.
The governor said Tuesday that he was proud of his wife for the reasons she entered — and exited — the race.
“She stood for the right things,” Mr. Murphy told reporters. “She worked her tail off, and it was a really tough decision for her. There’s very few people in this line of business who put party over self, and that’s exactly what she did.”
The deadline for filing to run in the primary was Monday, and her campaign was not likely to get any easier in the coming months.
Commuters are facing a 15 percent summertime increase in New Jersey Transit bus and train fares that some voters will no doubt blame on the Murphy administration.
And the lawsuit that Mr. Kim filed over the design of New Jersey’s primary ballots threatened to severely undermine Ms. Murphy’s candidacy.
It also has the potential to fundamentally reshape politics in the state.
In New Jersey, preferred candidates for every office are grouped together in the same prominent column or row — ballot placement that is known as “the line” and has been proven to bestow a roughly 38 percentage point advantage. New Jersey is the only state that does it this way.
After Mr. Kim sued to end the practice, the state’s attorney general said that he agreed the ballot design was unconstitutional.
Ms. Murphy’s success, however, was dependent on appearing in the prominent ballot spot in the state’s most populous and heavily Democratic counties, including Bergen, Camden, Essex, Hudson, Middlesex and Union.
Mr. Kim reiterated late Sunday that he had no intention of dropping the suit, though he also said that he had accepted the invitation of Democratic leaders to appear on “the line” in counties that had been backing Ms. Murphy.
“We want to move away from this unfair, unconstitutional system that we’ve had in this state for too long,” Mr. Kim said in a call with reporters.
Still, his refusal to forgo “the line” if the judge does not order a ballot redesign by June 4 was immediately decried as hypocritical by some Democrats, including a rival in the primary, Ms. Campos-Medina, who has noted that she is now the only woman in the race.
County political leaders opposed to Mr. Kim’s request have also argued that Ms. Murphy’s decision to quit eliminated the need for the judge to order the state to rush to implement a new ballot structure before clerks must begin to mail ballots on April 20. (“This new development drastically changes the relevant analysis of irreparable harm,” Mark R. Natale, a lawyer representing Burlington County, wrote in a court filing.)
Scott D. Salmon, Ms. Campos-Medina’s lawyer, disagreed.
“The same immediate irreparable harm that Ms. Campos-Medina will suffer if compelled to compete under the county line system still exists today, as it did yesterday,” Mr. Salmon wrote to the judge.
“And if a statute was unconstitutional yesterday, it is still unconstitutional today.”