The Senate on Tuesday confirmed President Trump's choice to replace James Comey as the FBI director.

Christopher Wray, a former high-ranking official in George W. Bush's Justice Department, was confirmed to a 10-year term. His confirmation wasn't in doubt: Democrats changed Senate rules in 2013 to only require a simple majority vote, which Republicans have with their 52 seats.

All Republicans voted in favor of Wray's nomination, who was officially confirmed in a 92-5 vote just after 5 p.m. Eastern time.

He also garnered support from Democrats like Sens. Debbie Stabenow of Michigan, Patrick Leahy of Vermont, and Claire McCaskill of Missouri on Tuesday. Sen. Dianne Feinstein, the ranking Democrat on the Senate Judiciary Committee, also voted in favor of Wray after praising him during his confirmation hearing.

Democratic Sens. Kirsten Gillibrand of New York, Elizabeth Warren of Massachusetts, Ron Wyden of Oregon, Jeff Merkley of Oregon, and Ed Markey of Massachusetts voted against Wray.

Ahead of Tuesday night's vote, Senate Judiciary Committee Chairman Chuck Grassley praised Wray for having what he called "the skill, the character and the unwavering commitment to impartial enforcement of the law" needed in an FBI director.

"He has shown that he has the expertise needed to address the wide range of policy issues currently facing the FBI," the Iowa Republican said from the Senate floor.

"I was proud to join all of my colleagues on the Judiciary Committee — now that is not an ordinary thing to have happened on its own, that we all agreed on something — from both sides of the aisle to support Mr. Wray's nomination," Sen. Amy Klobuchar, D-Minn., said Tuesday.

Wray sailed through his confirmation hearing in the Senate Judiciary Committee last month, garnering bipartisan support as he pledged to be independent.

"My loyalty is to the Constitution and the rule of law. Those have been my guideposts throughout my career, and I will continue to adhere to them no matter the test," Wray told the senators. He said he would resign if asked by the president to do something illegal.

Wray replaces Comey, who was fired suddenly by Trump in a move Democrats say was aimed at undermining the investigation into Trump's alleged ties to Russia. With today's vote, Wray becomes the just the eighth non-acting FBI director.

The 50-year-old is currently a partner at King & Spalding law firm, where he specializes in white-collar criminal cases.

Before rising to lead the Justice Department's Criminal Division in 2003, he held other high ranking positions in the department from May 2001 to May 2005. Wray has also served as principle associate deputy attorney general.

Wray becomes only the second FBI director since 1972 to have senators oppose his nomination. Sen. Rand Paul, R-Ky., was the only dissenter against Comey in 2013.

Wray's nomination has been seemingly drama free, despite the drama that led to the nomination.

Attorney General Jeff Sessions had recused himself from the Justice Department's broader investigation into the 2016 presidential election and Russian interference in March.

Then, Trump fired Comey in early May in the middle of the FBI's own investigation into collusion between the president's campaign and Russia.

Deputy Attorney General Rod Rosenstein less than two weeks later named former FBI Director Robert Mueller to lead the special counsel to oversee the investigation into Trump's campaign and Russia.

In early June, Trump announced on Twitter he planned to nominate Wray to lead the FBI. Three weeks later, he formally sent Wray's nomination to the Senate.