Washington (CNN) The Senate voted overwhelmingly Tuesday to confirm Christopher Wray to be the new FBI director.

The vote was 92-5.

Wray succeeds James Comey, who was fired by President Donald Trump ostensibly for his handling of the investigation into Hillary Clinton's email practices, though the President later said he had the Russia investigation on his mind when he axed Comey.

Democratic Sens. Kirsten Gillibrand, Elizabeth Warren, Ron Wyden, Ed Markey and Jeff Merkley voted against confirmation.

Wray, who is now a private lawyer, was a top Justice Department official during the George W. Bush administration. He was recommended unanimously by the Senate Judiciary Committee on July 20.

During his confirmation hearings , the Yale-trained lawyer pledged his independence from the White House, repeatedly telling a Senate panel he would not be "pulling punches" in the position and that he'd resign if he is asked to do something illegal or immoral.

"My commitment is to the rule of law, to the Constitution, to follow the facts wherever they may lead," Wray told the judiciary panel. "And there isn't a person on this planet whose lobbying or influence could convince to just drop or abandon a properly predicated and meritorious investigation."

In a floor speech, Judiciary Committee Chairman Chuck Grassley, R-Iowa, said Wray takes over the agency as it continues to investigate issues related to Russia and Trump.

"Multiple investigations are underway, including by this body, to clearly lay out Russia's activities that attempted to influence the 2016 election," Grassley said. "These are important and sensitive investigations, and they cannot be inappropriately influenced by people in powerful positions, in any way. This applies to the FBI director."