Attorney General John D. Ashcroft announced yesterday that he has selected a senior FBI official and former federal prosecutor to serve as interim U.S. attorney for the District.

Kenneth L. Wainstein, who was chief of staff to FBI Director Robert S. Mueller III, was sworn in yesterday at U.S. District Court, taking charge of the largest U.S. attorney's office in the country.

The news ends days of speculation about who will succeed Roscoe C. Howard Jr., who announced May 18 that he was stepping down after nearly three years in the job. Howard, whose last day was yesterday, is going into private practice.

Wainstein, 42, handled numerous high-profile matters as a prosecutor for the office, including the case that led to the conviction of Carl Derek Cooper for the 1997 slayings of three people at a Starbucks coffeehouse. Last night he said he is excited to rejoin a staff he considers among the best in the country.

"There is no more satisfying or meaningful work than being a prosecutor in D.C.," he said.

Wainstein was the Bush administration's interim pick the last time the job opened up, serving for several months in 2001, before stepping aside when Howard was nominated. The president chooses U.S. attorneys, subject to Senate confirmation. This time, Wainstein could emerge as the White House's permanent choice.

The Washington office is unique because it prosecutes local as well as federal crimes. Despite its size and status, it has been passed over by the Justice Department in recent years for important cases. Many such cases, particularly involving terrorism, have ended up in New York or Virginia.

With his connections to the highest levels of the Justice Department, Wainstein could be in a stronger position to push to get the kind of major cases the office traditionally has handled.

"There are a lot of big cases out there, a lot of big investigations, and whenever a case like that arises, I'm going to urge that we have a substantial role," Wainstein said.

The attorney general names interim leaders of U.S. attorney's offices, and those appointments are for no more than 120 days. After that, the chief judge of the U.S. District Court makes the temporary appointments, typically keeping the previous interim leaders.

With the presidential election about five months away, it is unclear whether the White House will move to permanently fill the job this year. Current and former federal prosecutors said that they believed Wainstein would rank high on any list compiled by the Bush administration but that others could emerge if Sen. John F. Kerry (Mass.), the presumptive Democratic presidential nominee, defeats President Bush in November.

Asked about his long-term prospects, Wainstein was circumspect, saying he is thrilled to be in the job. "I would be honored to serve any length of time," he said.

Unlike other cities, many of which have elected prosecutors, the community has no direct say in who gets the job in Washington. It remains unclear whether the Bush administration will seek advice from Mayor Anthony A. Williams (D), Del. Eleanor Holmes Norton (D) or other local officials.

In a letter this week, Norton urged Bush to appoint someone who lives in the District or would be willing to move there. Howard lives in Virginia, a sore point with some D.C. officials.

Wainstein grew up in Alexandria and lives there now but said he understands the feelings of Norton and others in the city. "I think that's an understandable concern on the part of residents of the District, and I would be willing to move into D.C.," he said.

Ashcroft did not offer any indication about the administration's long-range intentions yesterday but praised Wainstein, who had a high-ranking job at the Justice Department before moving to the FBI in July 2002.

"Ken has served our nation with distinction for years, fighting gang violence and working to keep hardened criminals off the street," Ashcroft said in a statement.

Wainstein began work as a prosecutor in 1989 with the U.S. attorney's office in New York. He moved to the prosecutor's office in Washington in 1992, staying until August 2001, when he became the Justice Department's director of the Executive Office for U.S. Attorneys. He later became the FBI's general counsel and Mueller's chief of staff as the agency focused on counterterrorism.

Kenneth L. Wainstein could emerge as the permanent pick.