As lawmakers took breaks during a tense congressional hearing last week to vote on a resolution meant to shame him, Deputy Attorney General Rod J. Rosenstein casually worked the room, chatting up reporters and photographers who had come to hear his testimony and shaking the hands of GOP congressmen who had just voted to censure him.

Rosenstein has been in the hot seat ever since he appointed Robert S. Mueller III to investigate whether the Trump campaign coordinated with Russia to interfere in the 2016 election. The president dislikes him, and conservative Republicans in Congress have toyed with impeaching him over Russia-related documents they say he will not hand over. Those who work for Rosenstein know any day could be their boss’s last.

But in more than 14 months on the job, the former Maryland U.S. attorney seems to be getting used to the constant controversy and criticism that comes from overseeing Mueller. Rather than walking on eggshells, he’s starting to fight back.

“I don’t know if it’s comfort, but I think at some point he made a decision that he would stay within the ethical bounds that he’s in, but he wouldn’t be a punching bag,” said James M. Trusty, a former Justice Department official who is friends with Rosenstein. “You see a little steel in the spine every now and then, where he’s just decided, ‘I’m going to keep doing it my way.’ ”

Deputy Attorney General Rod J. Rosenstein told Congress "nobody should draw any conclusions beyond [the already filed] charges." (Reuters)

Through a Justice Department spokeswoman, Rosenstein declined to comment.

At a House Judiciary Committee hearing on June 28, Rosenstein sparred with Republican lawmakers who accused him of inappropriately withholding documents on the Mueller probe and asked him whether he had threatened staffers on the House Intelligence Committee. The normally placid Rosenstein shook his finger at Rep. Jim Jordan (R-Ohio) in a fiery exchange in which Jordan also told the deputy attorney general his inquiries were “not personal.” He later raised doubts about Rosenstein’s credibility.

“Well, now, who are we supposed to believe? Staff members who we’ve worked with, who have never misled us? Or you guys, who we’ve caught hiding information from us, who tell a witness not to answer our questions?” Jordan said.

Deputy Attorney General Rod J. Rosenstein has been the target of President Trump's ire for months. Here's a look back at their history. (Jenny Starrs, Monica Akhtar/The Washington Post)

“Thank you for making clear it’s not personal, Mr. Jordan,” Rosenstein retorted, drawing laughter from the room.

Soon after the confrontation, the House of Representatives voted 226 to 183 to pass a resolution calling on the Justice Department to comply with congressional document requests by this past Friday. The move was essentially meant to humiliate Rosenstein — who had told Speaker Paul D. Ryan (R-Wis.) that the resolution failed to acknowledge the “extraordinary” and “unprecedented” efforts that officials have made to comply.

On Friday, the Justice Department formally responded to the resolution, telling top lawmakers on the House Intelligence and Judiciary committees that officials believed they had “substantially complied” with Congress’s requests and any leftover production of materials would be completed “expeditiously.” Just before that, some of the lawmakers most bent on holding Rosenstein responsible for the production of the documents were sounding notes of optimism about the Justice Department’s expected compliance.

“I know there’s a long way between promise and actual compliance, but the theme has been consistent this week that they are moving in the right direction,” Rep. Mark Meadows (R-N.C.), the original author of the resolution, said in an interview.

“Obviously contempt and impeachment measures are certainly on the table and available to us . . . but there does seem to be a renewed attitude of at least a desire to comply that goes well beyond the words that we’ve been hearing for the last several months,” he added.

Earlier this year, Trump-allied conservatives drafted articles of impeachment against Rosenstein. The president — who has publicly criticized the Justice Department for not turning over documents — has mused about firing his deputy attorney general.

Democrats charge that Republicans’ requests for documents are part of a thinly veiled effort to undermine the Russia probe. Their Republican colleagues, they say, are essentially fishing for material that might discredit Mueller, or using Rosenstein’s refusal to hand over documents on the ongoing investigation as a way to discredit him.

That is important because Rosenstein appointed and supervises Mueller. If he were to be removed from his post, some Democrats fear his successor might place more limits on the special counsel investigation.

At least publicly, Rosenstein has not acted like a dead man walking. He was spotted at a July 4 celebration at the White House, in a VIP viewing area, according to Politico. Those who know him say Rosenstein is playing the long game. He does not put too much stock in any single daily development, they say, but is mindful about what his place in history will be.

“There’s kind of a fatalism to it that’s good,” Trusty said. “He doesn’t overreact.”

So far, the strategy has paid off. The Justice Department has for months been haggling with lawmakers over requests for various materials on the Russia investigation and the investigation of Hillary Clinton’s use of a private email server while she was secretary of state. But even as the president has raged about Rosenstein, and lawmakers have repeatedly escalated the confrontation with new subpoenas and threats, each seemingly ominous moment has passed without incident.

The Justice Department and the FBI have assigned additional staffers to process document requests and tasked the U.S. attorney in Chicago with overseeing production of material related to Clinton.

Some Justice Department decisions on producing documents about an ongoing case have left legal analysts worried that dangerous precedents are being set. Georgetown Law professor Paul Butler said he was particularly troubled when, after the president demanded on Twitter that the department investigate whether the FBI had infiltrated his campaign for political purposes, Rosenstein asked the inspector general to look into the matter.

Rosenstein has opined publicly that the Justice Department can’t open its files to Congress. Discussing the document spat during an event at the Newseum in May, Rosenstein said of those threatening to impeach him, “I think they should understand by now that the Department of Justice is not going to be extorted.”

Butler, who worked with Rosenstein when he was a Justice Department public integrity prosecutor years ago, said colleagues would jokingly refer to Rosenstein as “Opie,” a character on TV’s Andy Griffith Show, in part because of his boyish face, and in part because he was always asking questions. But Butler said Rosenstein was more shrewd and strategic than his “aw shucks” mannerism leads some to believe.

Butler said that while Rosenstein has had to “make some difficult compromises,” many career prosecutors look at him “as essentially responsible for preserving the integrity of the department and, by extension, preserving the rule of law during the Trump administration.” On that score, Butler said, Rosenstein has had more good days than bad, and his recent congressional testimony shows what he is trying to tell Republicans: The Department of Justice is not to be played with.

“He’s already compromised that message some,” Butler said, “but there is a line with him that you can’t cross.”