WASHINGTON — President Bush's pick to be the No. 3 official in the Justice Department asked to have his nomination withdrawn Friday, four days before he was to testify before the Senate Judiciary Committee.

Bill Mercer sent a letter to Attorney General Alberto Gonzales saying it was unlikely that the Senate would confirm him to a post he has held on an interim basis since September. He will leave Washington and turn his full attention to his work as U.S. attorney for Montana.

"With no clear end in sight with respect to my nomination, it is untenable for me to pursue both responsibilities and provide proper attention to my family," Mercer wrote.

The Judiciary Committee had scheduled a hearing on Mercer's nomination for Tuesday. A spokeswoman for the committee had said senators needed the facts from an investigation into the firings of several federal prosecutors before he could be confirmed.

"The White House has found many ways to keep sunlight from reaching some of the darker corners of the Bush Justice Department, but this is a new one," Judiciary Committee Chairman Patrick Leahy, D-Vt., said in a statement. "With a confirmation hearing looming next Tuesday, they have withdrawn this nomination to avoid having to answer more questions under oath."

Mercer's name comes up at times in thousands of pages of e-mail exchanges between Justice Department and White House officials discussing the firings. The panel had authorized a subpoena for Mercer as part of its investigation.

The demise of Mercer's nomination points up the difficulty Bush faces as he tries to fill the top ranks of a Justice Department wilting under the weight of the Democratic-led congressional investigation into whether the White House, in effect, runs the agency.

Several lawmakers, including Sen. Arlen Specter, the top Republican on the Judiciary Committee, have said the department is so dysfunctional that it suffers with Gonzales still at the helm. But with Bush's support behind him, Gonzales shows no signs of resigning. He has said he plans to stay in the post until the end of Bush's term, virtually ensuring that majority Democrats will push ahead with their investigations of his stewardship.

Montana's two Democratic senators, Jon Tester and Max Baucus, have criticized Mercer for working both jobs and have called for him to resign as the state's U.S. attorney or give up his Justice Department post.

In his letter, Mercer said he "heard the call" from the senators.

"This change will address their concerns with certainty as opposed to the uncertainty of a more protracted nomination process," he said.

In a statement Friday, Gonzales praised Mercer's role as the No. 3 official at Justice and said he is "very pleased that the department will continue to benefit from his leadership, talent and experience through his role as U.S. attorney in Montana."