The Senate Judiciary Committee unanimously confirmed Christopher Wray to be the next director of the FBI.

Wray's nomination sailed through the committee, 20-0, winning the support of some unlikely Democrats, including Sen. Dick Durbin, D-Ill., and Sen. Patrick Leahy, D-Vt.

Republicans could have advanced Wray's nomination even without the support of Democrats, but they will need the minority party when they hold a final vote on the nominee before the full Senate.

Ahead of Thursday's vote, both Chairman Chuck Grassley, R-Iowa, and ranking member Dianne Feinstein, D-Calif., expressed their support for Wray's nomination.

"I believe Mr. Wray has the right view of the job. During his hearing, he spoke of the work the FBI does with deep respect and praised the efforts of the FBI in keeping Americans safe," Grassley said. "And he told us where his loyalties lie. He said that his loyalty 'is to the Constitution and the rule of law.' He elaborated, 'They have been my guideposts throughout my career, and I will continue to adhere to them no matter the test.'"

"I'm satisfied he has the qualifications and independenence necessary to lead the FBI," Feinstein echoed.

President Trump nominated Wray in June to replace James Comey, whom he fired abruptly in May amid the FBI's investigation into ties between Trump campaign officials and Russia.

Wray, 50, has been both a criminal prosecutor and a defense attorney, spending the past 12 years at King and Spalding law firm. He also has history with the federal government, having led the Department of Justice's Criminal Division under former President George W. Bush.

In private practice, Wray represented New Jersey Gov. Chris Christie during the "Bridgegate" scandal, during which two of Christie's aides closed down parts of the George Washington Bridge in an act of political retribution.

If confirmed by the full Senate, Wray will take over the FBI during a time when focus on the bureau is heightened.

The FBI was investigating Russian meddling in the 2016 election, but after Comey's firing, the Justice Department appointed a special counsel, former FBI Director Robert Mueller, to lead the probe.

If confirmed, Wray would not play a role in the investigation.

During his confirmation hearing, Wray impressed both Democrats and Republicans on the Senate Judiciary Committee when he vowed to ensure the FBI maintains its independence and pledged loyalty only to the Constitution and the rule of law.

"They have been my guideposts throughout my career, and I will continue to adhere to them no matter the test," he said.

He also said he would resign if asked by the president to do something illegal, and called any effort to interfere in Mueller's investigation into Russian meddling "unacceptable and inappropriate."