WASHINGTON — Since President Bush took office, one of the administration's most loyal and valued advisors at the Justice Department has been William W. Mercer.
When a team of young White House and Justice Department staffers decided to fire a group of U.S. attorneys on Pearl Harbor Day 2006, it was left to Mercer to be the bearer of the bad news to some of the prosecutors.
And when other department attorneys decided to apply an ideological litmus test to candidates for honors and internship positions, Mercer went along, or at least failed to exercise diligent oversight, according to a report last month by Justice Department watchdogs, the Office of the Inspector General and the Office of Professional Responsibility.
Mercer also had the distinction of simultaneously holding two Justice Department jobs about 2,000 miles apart. Eventually, he had to relinquish one, a senior post at headquarters here.
Mercer remains the top federal prosecutor in Montana -- despite periodic calls for his resignation by a federal judge there and by one of the state's Democratic senators. He is one of only a few U.S. attorneys who may survive all eight years under Bush.
How a prosecutor from one of the nation's least populous states -- and who has had so many brushes with scandal -- became such an influential person at the Justice Department mystifies some of his critics.
"It is remarkable how he has survived all this," said Kevin O'Brien, a spokesman for the Montana Democratic Party.
Many of the Justice officials involved in the controversies that led to the resignation of former Atty. Gen. Alberto R. Gonzales left the department. Mercer stayed on -- but he left Washington, which probably helped him avoid the spotlight of congressional investigators and media coverage.
Today, Mercer is still a popular figure within the Bush administration. The 44-year-old career federal prosecutor has on occasion been considered a potential Republican candidate for governor or senator in Montana, although he is not on the ballot this year.
"Bill Mercer continues to serve effectively and ably as United States attorney for the district of Montana," said Peter Carr, a Justice Department spokesman.
Mercer, who through a spokeswoman declined to be interviewed, was appointed by Bush as a U.S. attorney in 2001, and early on he made a mark as a hard-charging advocate of tough sentences for people convicted of federal crimes.
He became the administration's point man before Congress, exhorting strict adherence to federal sentencing guidelines -- a tough-on-crime posture central to the Republican law enforcement agenda.
"He recognized this as an issue that would grease the skids of his movement upward in the Justice Department and the administration," said Tony Gallagher, the federal public defender in Montana. "Bill is a very bright guy, very personable if you get to know him," Gallagher added. "But his policies are inimical to mine."
Mercer turned his district in Montana into what the Justice Department hoped would be a national model. But some judges and defense lawyers, including Gallagher, said that in many cases the sentences his office won were overly punitive.
Mercer has also taken heat from the bench for using federal resources to prosecute routine cases. His fiercest critics have included the federal judge in Missoula, Mont., Donald W. Molloy, who has on occasion accused Mercer of using his clout to burnish his resume.
"Your job is not to get convictions. Your job is to ensure that justice is done," Molloy scolded Mercer at a hearing in 2006.
In 2005, after Mercer accepted a senior Justice Department job in Washington but refused to surrender his U.S. attorney post, Molloy wrote to Gonzales trying to get Mercer fired.
The judge, who was appointed to the bench in 1996 by President Clinton, contended that Mercer was violating a federal law that requires U.S. attorneys to reside in the districts they serve. Gonzales responded that he saw no impropriety.
According to published reports, Mercer later helped slide language into a terrorism bill that exempted him and others from the residency requirement.
Under Gonzales, Mercer's star continued to rise. In September 2006, Bush nominated Mercer to be associate attorney general, Justice's No. 3 official.
Mercer had a front-row seat to some of the controversies that marked Gonzales' tenure.
There was no evidence that he was involved in orchestrating the firings of the U.S. attorneys, but some of the dismissed lawyers said they felt betrayed that their former colleague had been a foot soldier in the process.
Around the same time, a young attorney named Esther Slater McDonald was hired as counsel to Mercer, who assigned her to a committee that screens candidates for the coveted department honors program. The Justice watchdog report last month concluded that McDonald violated civil service laws and department regulations because she considered politics and ideology in filling the positions.
The report also found that Mercer "did not adequately address the concerns that were brought to his attention by several senior department officials" that the committee process had become politicized. Mercer told investigators that he had not told McDonald how to conduct the reviews.
In addition, the report cited an e-mail exchange in which Mercer scoffed at a candidate with an interest in environmental law and who once served as a law clerk to a judge seen as sympathetic to plaintiffs' lawyers.
Eventually, the Gonzales era imploded before Mercer was confirmed to the senior Justice position. Last year, with his nomination in doubt and Senate Democrats preparing a grilling, he withdrew his name from consideration and returned to Montana.