WASHINGTON (AP) — Hundreds of Justice Department employees gathered Thursday to send off Deputy Attorney General Rod Rosenstein, capping a tenure marked by a tumultuous relationship with President Donald Trump.

Attorney General William Barr and former Attorney General Jeff Sessions were among the speakers, praising Rosenstein's dedication to a difficult job. Rosenstein's tenure as the department's No. 2 coincided with some of the most consequential moments of the president's term, including the firing of ex-FBI director James Comey and the appointment of special counsel Robert Mueller.

And the ceremony itself comes at a turbulent time for the Justice Department. Scores of Democrats have called for Barr's resignation and the House Judiciary Committee voted on Wednesday to hold him in contempt after he refused to comply with a subpoena for a full un-redacted version of Mueller's report and underlying investigative documents.

"You like records," Barr said jokingly to Rosenstein. "This must be a record, of an attorney general being proposed for contempt within 100 days of taking office."

Rosenstein stepped in to take over supervision of the Russia probe after Sessions recused himself. He authored a memo the White House used to justify firing FBI Director James Comey, whose agency was leading the investigation into Russian interference at the time. Days later, Rosenstein appointed Mueller, a move that Trump feared could end his presidency.

But by the end of his time at the Justice Department, Rosenstein appeared to be largely in Trump's corner, joining Barr in determining Trump had not obstructed the Mueller investigation — a conclusion Mueller pointedly did not make.

"Decisions had to be made, and those decisions fell to him and they fell to him alone," Sessions told the crowd. "He made every decision based on his best judgment of what he thought was best for this country. He stayed the course during some of the most difficult times in the history of the department."

During the nearly two years as deputy attorney general, Rosenstein — a Trump appointee — became a frequent target of the president and other Republicans. Trump once retweeted an image showing Rosenstein and others criticized by the president behind bars, calling for them to be tried for "treason."

In September, Rosenstein went to the White House expecting to be fired after news reports that he had discussed secretly recording Trump and invoking a constitutional amendment to remove Trump as unfit for office. He was ultimately allowed to stay on after private conversations with Trump and John Kelly, who at the time was White House chief of staff.

Sessions said he knew there would be a lot of controversies when he took the job. The attorney general's office "frequently finds itself at the vortex of law and politics and the separation of powers," he said.

"But in truth, I have to say our run exceeded my expectations. Considerably," Sessions said, turning to Rosenstein as laughter erupted from the audience.

Sessions resigned in November at the president's request, and Trump nominated Barr as his successor. Rosenstein's departure had been expected after Barr was named attorney general. He had planned to leave his post around mid-March, but stayed on for the completion of Mueller's investigation.

Amid backlash from Democrats, Rosenstein defended Barr against criticism that he was spinning Mueller's findings in the president's favor. He stood silently behind Barr at a news conference as the attorney general praised Trump's cooperation in the investigation.

Toward the end of the ceremony Thursday, Rosenstein's deputy Ed O'Callaghan — who gained Twitter fame for his beard after standing behind Barr at the same news conference last month — presented his boss with a fake beard. Rosenstein put it on with a smile.

"I leave here confident that justice is in good hands, in your hands," Rosenstein told the audience after recounting his nearly three-decade career at the Justice Department.

Trump has nominated Jeffrey Rosen, the deputy transportation secretary who was a longtime litigator, to replace Rosenstein. The Senate Judiciary Committee on Thursday voted to approve Rosen's nomination, though Democrats have raised questions about Rosen's lack of criminal law experience.

The full Senate will now need to vote on his nomination.

___

Follow Balsamo on Twitter at www.twitter.com/MikeBalsamo1 .

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.