President Obama announced Thursday that he is seeking a two-year extension of Robert S. Mueller III’s term as FBI director, saying he cannot afford to lose the longtime chief at a time of transition elsewhere in the government.

The request for Congress to extend Mueller’s 10-year term follows a problematic search for his replacement, which administration officials said Thursday had yielded an unsatisfactory shortlist of candidates.

Unless Congress acts on Obama’s request, Mueller, 66, will face mandatory retirement in September after a decade in which he oversaw the crackdown on terrorism that followed the Sept. 11, 2001, attacks, along with the bureau’s ongoing transformation into an intelligence-driven agency.

“In his 10 years at the FBI, Bob Mueller has set the gold standard for leading the bureau,” Obama said in a statement. “Given the ongoing threats facing the United States, as well as the leadership transitions at other agencies like the Defense Department and Central Intelligence Agency, I believe continuity and stability at the FBI is critical at this time.”

The unexpected — and highly unusual — request comes more than a week after U.S. forces killed Osama bin Laden in Pakistan. Although the military carried out that raid, the FBI plays a critical counterterrorism role, and the bureau is involved in analyzing the treasure trove of materials found in the al-Qaeda leader’s compound.

Attorney General Eric H. Holder Jr. broached the subject with Mueller several weeks ago, and Obama made his decision to keep Mueller last week. The president and the FBI director spoke by phone about the move Tuesday, an official said. In a message to FBI employees on Thursday, Mueller said he would be “honored” to continue serving, officials said.

Mueller, a disciplined and energetic figure, has a strong relationship with the president that officials said would have been difficult to replicate. Administration officials also saw potential hurdles in winning confirmation for some of their candidates and were happy to dodge a rough political battle in an election year.

It will take an act of Congress to extend Mueller’s tenure, which is limited to 10 years. Sen. Patrick J. Leahy (D-Vt.), chairman of the Senate Judiciary Committee, is considering legislation he hopes
will be bipartisan, congressional sources said.

Reaction from Republicans was mixed, but no significant opposition emerged to an extension for Mueller, who generally has bipartisan support on Capitol Hill. Senate Minority Leader Mitch McConnell (R-Ky.) told reporters he supported Obama’s request, but Sen. Charles E. Grassley (Iowa), the ranking Republican on the Judiciary Committee and a longtime FBI critic, called it “an unusual step by the president and somewhat of a risky precedent to set.”

White House officials said it would not set a precedent because the administration is seeking a one-time extension that would expire in 2013.

Still, some law enforcement sources expressed dismay that Mueller would not depart as planned, saying that agents have been looking forward to a “new face” at the helm and that many careers have been on hold with so little turnover in the top job.

Law enforcement sources have said that the search for Mueller’s successor was being led by Vice President Biden, who chaired the Judiciary Committee when he was in the Senate, and that Holder was deeply involved.

Experts have said that Mueller, a low-profile former Marine and federal prosecutor with a no-nonsense style, would be difficult to replace. Mueller started a week before the 9/11 attacks, and his agency has led the government’s efforts to prevent another terrorist attack on U.S. soil. It has also been criticized by some civil liberties advocates and Muslim leaders for what they consider tactics that infringe on civil rights.

Officials have said in recent weeks that the administration was having difficulty finding a successor for Mueller and that some top candidates didn’t want the job. Other sources denied that, saying the high-pressure post was attracting sufficient interest.

“I think this decision is equal parts a vote of confidence in Mueller and a vote of no confidence in his possible successors,” said Mueller biographer Garrett Graff. “If there had been one super-clear candidate, then I think it would have been easier for them to pick someone else.”

Possible candidates to succeed Mueller included Patrick J. Fitzgerald, the U.S. attorney in Chicago who investigated the leak of the identity of former CIA officer Valerie Plame Wilson; New York Police Commissioner Raymond Kelly; and John S. Pistole, administrator of the Transportation Security Administration and Mueller’s former deputy.

Other possible candidates, sources have said, were James B. Comey, who was deputy attorney general in George W. Bush’s administration; Michael A. Mason, former head of the FBI’s Washington field office; Frances Fragos Townsend, a top Bush terrorism adviser; Kenneth L. Wainstein, a former top Justice Department official; and Neil H. MacBride, the U.S. attorney in Alexandria.