WASHINGTON — President Barack Obama will ask Congress to allow FBI Director Robert Mueller to remain in his job an extra two years, a rare exemption that would give the government continuity in a time of change atop the national security team, senior administration officials told The Associated Press today.

The news comes as a surprise for an administration that had been seriously vetting candidates to replace Mueller, whose term is set to expire on Sept. 4 under a law that caps the service of FBI directors at 10 years.

Obama wants Mueller’s stability and leadership at the FBI, particularly since the president has announced changes atop the CIA and Defense Department, according to the officials, who spoke to The Associated Press on condition of anonymity because the president had not yet revealed the decision.

The White House was expected to announce the news later today.

Mueller was appointed by Republican President George W. Bush and began just a week before the Sept. 11 terrorist attacks of 2001. Well regarded by Republicans and Democrats, Mueller is known for transforming a crime-fighting agency into the front line of defense against terrorism.

Obama will ask Congress for a two-year extension that would apply only to Mueller. White House officials say it has never been done for an FBI director, but has in other cases.