Lawrence Summers and Janet Yellen are candidates to lead the Federal Reserve after Chairman Ben S. Bernanke steps down. ( Jerome Favre/Bloomberg; Sam Hodgson/Bloomberg News )

Lawrence H. Summers, one of the top candidates to lead the Federal Reserve, was being beaten up, and his friends from his White House years wanted to help him.

So earlier this month, recently departed Treasury secretary Timothy F. Geithner and other former Obama administration officials joined Summers for a private strategy call, according to people familiar with the discussion.

The old colleagues compared notes on what reporters were asking about Summers, who was under a steady assault from liberals who consider him as soft on regulating banks, and mapped out how they might respond.

President Obama’s long-term advisers have been working to help Summers in what has become the hottest political campaign of 2013: the race to succeed Ben S. Bernanke as Fed chairman.

Rarely has the appointment of a new Fed chairman been accompanied by so much commotion, penetrating even the political dead zone of mid-August. “I wouldn’t want Larry Summers to mow my yard,” Sen. Pat Roberts (Kan.) told an audience in his state this week, becoming the first Republican to announce that he would oppose a nomination of the former Treasury secretary.

The fight pits allies of Summers, who also was Obama’s top economic adviser during the darkest days of the recession, against those of rival candidate Janet Yellen, the Fed vice chairman who has been an architect of the bank’s effort to reduce unemployment rates.

The opposing camps have waged high-profile media campaigns, featuring dueling op-eds in the nation’s top newspapers, interviews defending their candidates and comments on social media. But the battle also has played out behind the scenes.

As Geithner has helped Summers navigate the uproar this summer, he also has been consulted by the president on whom the next Fed chairman should be, said a person familiar with the matter. Longtime advisers to Obama such as Jim Messina and Stephanie Cutter, now in the private sector and more skilled in the world of politics and media than Summers, offered to lend a hand to their former colleague.

Meanwhile, allies of Yellen publicized her attributes in the media while privately lobbying on her behalf — often without much success.

Christina Romer, a former chairman of the Council of Economic Advisers and a top advocate for Yellen, encouraged her former colleagues in the White House for months to introduce Yellen to a wider range of Obama aides, said a person familiar with the matter.

But little came of it. Logs showed that Yellen visited the White House only once over the past 21 / 2 years, compared with 15 times by Summers. (The most recent months have not been updated.)

“There is a natural tendency to want to hire people you know and trust. But good personnel practices say you need to make sure there is a wide range of people you know and trust,” Romer said. “They should have been working hard to get to know a number of possible candidates, including ­Janet Yellen.”

While the dueling efforts have come to resemble political campaigns, Fed mania didn’t start that way. Neither Summers nor Yellen was in favor of any organized effort to help them win the job. And although insiders on both sides say Summers has an edge in Obama’s thinking, the president has said he is considering various candidates and won’t decide until the fall.

The White House is not known to have done anything to favor a candidate, although Obama gave a fiery defense of Summers in front of two sets of Democratic lawmakers late last month, amid a furor over his potential appointment.

The brouhaha has been unusual for the apolitical Fed and a headache for the White House, which tries to be buttoned-down about internal deliberations and appointments. It’s also surprising because even though Yellen is better known for thinking about the Fed’s role in reducing the unemployment rate and Summers is known as a one-man economic brain trust for presidents, their policy differences are not vast.

Nevertheless, the drama may have drawn-out consequences.

“The longer what I call the ‘silly season’ persists, the more it raises questions in the marketplace and the private sector, and the more it can undermine the credibility of whoever gets selected down the road,” said Mohamed El-Erian, chief executive of Pimco, the nation’s largest bond company.

Summers has witnessed the drama this summer from a home on Cape Cod, Mass., where he occasionally has talked to former colleagues between playing golf and tennis. Friends say he has been fairly philosophical about the whole thing — hoping that he is nominated, but not overly tangled up in plotting.

Yellen, who is more constrained in what she can do as a current member of the Fed, has indicated that she is trying to do her job during a tense time for the Fed without getting caught up in the saga, said a person familiar with her thinking. Private by nature, Yellen has shown a dislike of the intense media spotlight.

The recent drama represents the culmination of months of anticipation about the direction of the White House’s closely guarded process for finding a new Fed chairman, according to 10 people involved in the discussions.

Since well before he left the Treasury Department in January, Geithner had begun to think about what Obama would want in a new Fed chairman. Some thought that Bernanke, who had made clear that he was ready to move on, may not even want to finish out his term, which ends this coming January.

Geithner told the White House he was not interested in the Fed job. As soon as he arrived, new Treasury Secretary Jack Lew made a top priority of figuring out whom he might recommend to the president as a new Fed chairman.

It was always clear to some officials involved in the deliberations that Yellen and Summers would be top candidates, with Summers probably having an advantage because of ties to the White House and his history in confronting financial crises. (With the recent flap, Obama threw a third name into the ring: Donald Kohn, Yellen’s predecessor.)

In the spring, articles started appearing in the media suggesting that Yellen was destined to replace Bernanke and become the first woman to lead the Fed. Summers’s public stock fell, as whisperers in Washington and on Wall Street noted a reputation that he’s difficult to work with.

Around that time, friends, who found the characterizations unfair, began calling Summers, who had returned to Harvard after leaving the White House at the end of 2010, to ask if they should promote his candidacy for the Fed job. He had a clear instruction for them: No lobbying.

As the months went on, word began to leak out that Summers was, in fact, a serious rival to Yellen for the post.

Liberal groups erupted because Summers had favored a series of deregulatory acts at the end of the Clinton administration. A large posse of Democratic senators signed a letter backing Yellen, in a clear affront to Summers.

“I have seen an anti-Larry faction that has been waiting in the weeds for a decade or more,” said Brad DeLong, an economist at the University of California at Berkeley who has strong connections to Summers, Romer and Yellen and has said he narrowly favors Summers for the post.

As Summers faced withering criticism from his own party, he decided to “take off the gloves,” a friend said, and gave the go-ahead to his old friends and colleagues to counter the attacks.

Messina and Cutter, among others, offered to help Summers, people familiar with the matter said. Other colleagues who worked with Summers to rescue the financial system and economy in 2009 extolled his support for tough new financial regulations after the crisis.

Yellen has had her own cadre of operatives. Romer and Alan Blind­er, a former Fed vice chairman who is close to the White House, encouraged other economists to show support for her, said people familiar with the matter.

On Thursday, the debate over the next chairman will continue at the Fed’s annual economic conference in Jackson Hole, Wyo., where Yellen will have a prominent but ceremonial role. Summers will not attend.