WASHINGTON — Reluctant to see another shake-up in his national security team, President Barack Obama said Thursday he wants to stick with FBI Director Robert Mueller, the sturdy face of the bureau whose term has spanned from the Sept. 11 attacks on America to the killing of terrorist leader Osama bin Laden. Key lawmakers indicated support for Obama’s surprise decision.

Keeping Mueller on the job would require an act of Congress since the law allows an FBI director to serve only for 10 years, and Mueller’s term is up on Sept. 4. Obama said he wants Mueller to remain for two more years, which would keep him in place well after the next presidential election, into September 2013.

Mueller is the longest-serving FBI chief since J. Edgar Hoover, whose checkered 48-year term ended with his death in 1972 and led Congress to put the term limit in place.

Obama said the rare exemption for Mueller was needed for continuity and “for the sake of our nation’s safety and security.”

Obama already is in the midst of a reshuffling of his national security leadership, shifting CIA Director Leon Panetta to be Pentagon chief and Gen. David Petraeus to head up the spy agency. The changes await Senate confirmation at a time of renewed worldwide attention to the threat of terrorism.

In a sign of Mueller’s respected standing in both parties, lawmakers seem poised to allow him to stay atop the FBI.

Mueller is known for transforming a crime-fighting agency into the front line of defense against terrorism. Mueller was appointed by Republican President George W. Bush and began just a week before the Sept. 11, 2001, terrorist attacks. Obama said he has turned the FBI into a “pre-eminent counterterrorism agency.”

It wasn’t that way when he began. The carnage a decade ago at the World Trade Center and the Pentagon exposed vulnerabilities, and the FBI missed a number of clues that might have averted the attacks. Before 9-11, the FBI also came under fire for other messes, including one of its own, FBI agent Robert Hanssen, spying for Moscow for two decades.

The plan to keep Mueller on isn’t tied to the U.S. raid in Pakistan that led to the killing of bin Laden, the al-Qaida leader behind the Sept. 11 attacks, or to any threat of retaliation against the United States as a result of that mission, administration officials said.

Obama had been looking for successors for Mueller since the start of the year and, indeed, the attention on the top FBI position centered on who would succeed him. Other likely names surfaced. White House spokesman Jay Carney declined to say whether the president had met with candidates.

Mueller was offered the two-year extension a couple of days ago, said an administration official, speaking on condition of anonymity about the internal process. The official said that Mueller was not expecting the overture from the White House nor had he been looking to stay on.

Another potential factor in the mix: Any replacement for Mueller would have to be confirmed by an expanded Republican minority in the Senate, one with the votes to potentially complicate the prospects of an Obama nominee.

Under the scenario the White House has drawn, Mueller would serve two more years and then the president elected in 2012 would choose his successor for a decade.

The White House wants Congress to pass a stand-alone bill applying only to Mueller. He would not need to go through confirmation again.

The Republican House Judiciary Committee chairman, Rep. Lamar Smith of Texas, backed Obama’s move on the same grounds of “continuity for our intelligence community.”

The top Republican on the Senate Judiciary Committee, the panel that has jurisdiction over the FBI, lauded Mueller and offered a cautious, favorable response to Obama.

“This is an unusual step by the president and is somewhat of a risky precedent to set,” said Sen. Chuck Grassley of Iowa. He called the 10-year term limit on an FBI chief’s service, set in 1976, “an important safeguard against improper political influence and abuses of the past.” Still, he added: “We live in extraordinary times. So, I’m open to the president’s idea.”

White House officials say that although such an extension has never been granted for an FBI director, it has been done in other term-limited cases, citing a 1994 law that extended the terms of certain U.S. parole commissioners. The FBI chief’s 10-year term limit is in response to the legacy of Hoover’s abuses of power.

Administration officials said they have been consulting with lawmakers and are confident Congress will make an exception for Mueller.

Mueller, 66, is a former Marine who came to the FBI after a long career in law enforcement.

Sen. Patrick Leahy of Vermont, the Democratic chairman of the Judiciary Committee, endorsed Obama’s decision and said he was delighted to hear Mueller was asked to stay.

Missouri Republican Sen. Roy Blunt, a member of the Senate Intelligence Committee, said he supports the president’s decision to try to keep Mueller for another two years.

“I think he’s done an admirable job under difficult circumstances,” Blunt said.

Associated Press writers Pete Yost and Eileen Sullivan contributed to this report.