WASHINGTON (Reuters) - The U.S. Senate on Tuesday confirmed former Justice Department lawyer Christopher Wray as FBI chief, nearly three months after the agency’s previous director, James Comey, was fired by President Donald Trump.

Wray, who was confirmed by vote of 92-5, will take charge of the country’s top domestic law enforcement agency during a federal probe into allegations of collusion between the Trump presidential campaign and Russia.

Since the dismissal of Comey on May 9, the Justice Department has appointed Robert Mueller as special counsel to oversee the investigation with the help of the FBI. Russia denies any interference, and Trump has denied collusion with Russia.

Wray vowed in his confirmation hearing last month to remain independent and not be swayed by politics or pressure from the president. He also praised Muller as the “consummate straight shooter.”

He also worked with Comey on the government’s case in the Enron Corp fraud scandal in the early 2000s.

During the confirmation hearing, Republican Senate Judiciary Committee Chairman Chuck Grassley said Wray’s background showed he was committed to independence, an attribute he said was “vitally important” in the next FBI director.

Wray served as assistant attorney general in charge of the criminal division at the Justice Department under former Republican President George W. Bush.

Former Attorney General Eric Holder and former Deputy Attorney General Sally Yates, both Democrats who served under President Barack Obama, endorsed Wray.