Acting attorney general Matthew G. Whitaker is sworn in to testify before the House Judiciary Committee on Capitol Hill on Friday. (Andrew Harnik/AP)

President Trump took the opportunity Tuesday to thank acting attorney general Matthew G. Whitaker for his service at what was probably Whitaker’s last Cabinet meeting, telling him that he has “taken a tremendous amount of abuse.”

Trump’s comments referenced Whitaker’s combative appearance before the House Judiciary Committee last week, when he was pressed by Democratic lawmakers about special counsel Robert S. Mueller III’s investigation of Russian interference in the 2016 presidential campaign.

“You’ve taken a tremendous amount of abuse,” Trump told Whitaker as other Cabinet members looked on. “You handled yourself incredibly last Friday. But on behalf of all of us, I want to thank you very much.”

Applause ensued.

In a series of chippy exchanges during the hearing before Democrats who questioned his credentials, judgment and integrity, Whitaker adopted a confrontational tone that often left lawmakers exasperated.

At one point, Whitaker drew guffaws after noting that the committee chairman’s five-minute window to ask questions had expired.

Whitaker took command of the Justice Department in November following Trump’s ouster of Jeff Sessions, and he is likely to leave the job after the expected confirmation this week of William P. Barr to serve as attorney general.

Trump has frequently cited the perceived abuse that he and his aides endure. He has started calling stepped-up oversight by House Democrats “presidential harassment.”

And last month, Trump said he had directed White House press secretary Sarah Sanders “not to bother” with press briefings, in part because he believes that reporters are rude to her.

Devlin Barrett and Matt Zapotosky contributed to this report.