Rod Rosenstein was confirmed as U.S. deputy attorney general April 25, 2017, in a 94-to-6 vote in the Senate. (Melina Mara/The Washington Post)

The Senate voted Tuesday 94-to-6 to confirm Rod Rosenstein as the deputy attorney general, the second-highest ranking official in the Justice Department and the person who will oversee the investigation into suspected Russian meddling in the U.S. presidential election because the attorney general is now recused.

Rosenstein, 52, will serve essentially as the chief operating officer of the Department of Justice, reporting only to Attorney General Jeff Sessions and managing most of the department’s day-to-day affairs. He had worked since 2005 as the U.S. attorney in Maryland, where he earned a reputation as an independent and even-keeled prosecutor. His tenure was unusual in that it spanned Democratic and Republican administrations.

Rosenstein’s confirmation was never truly in doubt — although his confirmation was still contentious, as he refused to commit to appointing a special counsel to oversee investigations of alleged election meddling by Russia. Rosenstein’s confirmation hearing came the week after Sessions announced that he was recusing himself from any presidential-campaign-related investigations after The Washington Post reported that he had met with the Russian ambassador twice during that campaign and had not disclosed that fact at his confirmation hearing.

Rosenstein said he would handle the case “the way I would handle any investigation” and appealed to legislators’ patriotism.

“I don’t know the details of what, if any, investigation is ongoing, but I can certainly assure you if it’s America against Russia, or America against any other country, I think everyone in this room knows which side I’m on,” he said.

The investigation, though, continued to dog Rosenstein’s path to the upper ranks of the Justice Department. Senate Judiciary Committee Chairman Charles E. Grassley (R-Iowa) said last month he would hold up the vote on Rosenstein until FBI Director James B. Comey briefed his panel about probes into alleged ties between the Trump administration and Russian officials — a matter that was then out of Rosenstein’s control.

Rosenstein is only the second Senate-confirmed official at the Justice Department; all of the other top posts are being filled by people serving on a temporary basis.

The senators voting against Rosenstein’s confirmation Tuesday were all Democrats: Cory Booker (N.J.), Kirsten Gillibrand (N.Y.), Kamala D. Harris (Calif.), Catherine Cortez Masto (Nev.), Elizabeth Warren (Mass.) and Richard Blumenthal (Conn.).