WASHINGTON — The man who took over the FBI one week before the 9/11 terror attacks was named Wednesday as a special counsel to oversee the federal investigation into Russian interference in the 2016 election and possible collusion with the campaign of President Donald Trump.

The appointment of Robert Mueller to oversee the controversial investigation was quickly hailed by Democrats, who for weeks have called for the naming of an independent counsel. Republicans were slower to react, though those who did also portrayed the appointment in salutary terms.

“The appointment of former FBI director and respected lawyer Robert Mueller as special counsel for the Russia investigation is a positive development and will provide some certainty for the American people that the investigation will proceed fairly and free of political influence,” said Sens. Richard Burr, R-N.C., and Mark Warner, D-Va., the chairman and vice chairman of the Senate Select Committee on Intelligence. The senators said the committee’s own investigation into Russia and Trump will continue.

Rep. Devin Nunes, R-Calif., the chairman of the House Intelligence Committee, who recused himself from his committee’s probe after Democrats raised questions about his independence, also praised the appointment.

“This is the right decision at the right time, and the right man was chosen for the job,” Nunes said.

The White House offered no opinion on the appointment but in a statement attributed to Trump repeated its assertion that there had been no collusion between Trump’s campaign and the Russians. “As I have stated many times, a thorough investigation will confirm what we already know — there was no collusion between my campaign and any foreign entity,” the statement quoted Trump as saying. “I look forward to this matter concluding quickly.”

A quick resolution seemed unlikely, however, given the history of special counsels. Such investigations generally take years.

Mueller’s appointment came only hours before what had promised to be contentious private session between the full Senate and Deputy Attorney General Rod Rosenstein, the Justice Department official who had been overseeing the probe and whose role in last week’s firing of FBI Director James Comey had been the subject of angry commentary.

But Rosenstein’s appointment of Mueller likely was to take some of the edge off that meeting now.

Mueller is a veteran law enforcement figure who spent more than 35 years in public service. The second longest serving FBI director, he served under Presidents George W. Bush and Barack Obama before stepping down in 2013. As head of the Justice Department’s criminal division, he supervised the prosecutions of Panamanian strongman Manuel Noriega, the Lockerbie bombing case and the case against John Gotti of the Gambino crime family.

While the immediate reactions were positive, Mueller also arrives from a position at a law firm that has ties to members of the Trump campaign team and administration.

His current law firm, WilmerHale in Boston, also represents former Trump campaign manger Paul Manafort and Trump son-in-law Jared Kushner. That fact could expose Mueller to possible conflict of interest charges, said Kathleen Clark, who specializes in legal and government ethics and teaches at Washington University Law School in St. Louis.

“I think Mueller is going to have to be prepared to show that he didn’t have access to confidential information about Manafort,” one of the figures in the Russia-Trump probe, she said.

Rosenstein announced the appointment in a statement.

“I determined that it is in the public interest for me to exercise my authority and appoint a special counsel to assume responsibility for this matter,” the statement said. “My decision is not a finding that crimes have been committed or that any prosecution is warranted. I have made no such determination. What I have determined is that based upon the unique circumstances, the public interest requires me to place this investigation under the authority of a person who exercises a degree of independence from the normal chain of command.”

Democrats agreed. Sen. Dianne Feinstein, D-Calif., described it as a “good first step to get to the bottom of the many questions we have about Russian interference in our election and possible ties to the president.”

“Bob was a fine U.S. attorney, a great FBI director and there’s no better person who could be asked to perform this function,” she said. “He is respected, he is talented and he has the knowledge and ability to do the right thing.”

Sen. Patrick Leahy, D-Vt., a member of the Senate Judiciary Committee also praised him as “widely respected in Congress, across the political spectrum.”

What questions there were about whether Mueller would have the “resources and independence” to take the investigation wherever it might lead and whether his mandate would include all the issues that have been raised by the Russia-gate probe.

“The question also remains: Will Mueller’s investigation include President Trump’s attempt to intervene in the investigation of Michael Flynn?” House Minority Leader Nancy Pelosi of California said in a statement. “The American people have a right to the truth, free from the Trump Justice Department’s efforts to silence it.”

Rosenstein sought to head off such questions, promising that Mueller “will have all appropriate resources to conduct a thorough and complete investigation, and I am confident that he will follow the facts, apply the law and reach a just result.”

In 2006 interview with the New York Times, Mueller recalled a police corruption case from his days in Boston that may give an insight into the importance Mueller puts on corruption cases.

“You come to realize first of all that public corruption tears the fabric of a democratic society,” he said. “You lose faith in public officials. It leads to cynicism. It leads to distrust in government.”

Sen. Ron Wyden, D-Ore., called Mueller’s appointment “necessary” and “essential.” He credited aggressive news coverage as having driven the result.

“This announcement didn’t happen by accident — it happened because the free press and the American people demanded it,” he said. “This administration can’t get away with sticking its head in the sand and hoping the country’s outrage at this attack on our democracy would go away.”