Jeffrey A. Rosen was confirmed as the new deputy attorney general in a Senate vote Thursday that fell along party lines. (Andrew Harrer/Bloomberg News)

The Senate on Thursday confirmed Jeffrey A. Rosen to be the new deputy attorney general, succeeding Rod J. Rosenstein, whose Justice Department tenure was marked by tension with Congress and the White House over the special counsel investigation into President Trump.

Rosen, who has been serving as deputy secretary of transportation, becomes the Justice Department’s No. 2 official. Lawmakers voted along party lines, 52 to 45, to confirm him.

During his confirmation hearing last month, Rosen declined to promise Democrats that Congress would receive the redacted portions of special counsel Robert S. Mueller III’s report cataloguing the findings on Russian interference in the 2016 election and possible obstruction of justice by the president.

At that hearing, Sen. Richard Blumenthal (D-Conn.) warned Rosen that he would lose Democratic votes if he did not make such a promise. Rosen said only that he would follow department policies.

“I am going to do the right thing in accordance with the law and the rules, and the ethical requirements at every juncture,” he said.

Now that he has been confirmed, Rosen will probably have a role in the Justice Department’s escalating battles with Congress over access to Mueller’s complete report and its underlying investigative materials and witness interviews.

The House Judiciary Committee voted last week to hold Attorney General William P. Barr in contempt of Congress for refusing to provide a large group of lawmakers access to the redacted portions of the Mueller report.

The contempt vote followed a decision by the president to invoke executive privilege for the first time in his administration.

The fight over the Mueller report is a key piece of a broader political battle between Trump and congressional Democrats over access to witnesses and documents that may hold damaging information about the president.

Rosen has not worked in the Justice Department before, and some lawmakers have questioned whether he should have prosecutorial experience before assuming such an important job.

Rosen’s predecessor, Rosenstein, left the department last week after a fraught two years in which his job frequently appeared to be in jeopardy, as the president fumed over Rosenstein’s supervision of the Mueller investigation. Rosenstein, a Trump appointee, also sparred repeatedly with congressional Republicans who accused senior Justice Department and FBI officials of misconduct.

Typically, the deputy attorney general serves as a kind of chief operating officer, overseeing the FBI and other law enforcement agencies, but usually in a mostly behind-the-scenes manner. Rosenstein became a high-profile public figure, largely because Trump’s first attorney general, Jeff Sessions, recused himself from the Russia investigation, leaving it in Rosenstein’s hands.