WASHINGTON — He has a reputation as a principled lawyer. He has worked for both Republican and Democratic attorneys general. He has a jugular instinct in courtroom battles but a distaste for political ones.

Now Rod J. Rosenstein, the deputy attorney general, is confronting the political fight of his career. Amid sustained criticism by President Trump and rumors that he will be fired, Mr. Rosenstein is also maneuvering to defuse demands by Republicans in Congress that Democrats say are aimed at ousting him from his job — and from his role as protector of the special counsel, Robert S. Mueller III.

So far, he appears to be succeeding. But in trying to deflect those attacks, some say, Mr. Rosenstein has risked eroding the Justice Department’s historic independence from political meddling. The consequences could persist long after he and the rest of the Trump administration are out of power.

A small but influential group of House Republicans has demanded greater access to sensitive documents related to some of the F.B.I.’s most politically charged investigations into the Trump campaign and Hillary Clinton’s handling of classified emails. Should Mr. Rosenstein fail to comply, they have threatened to subpoena him, hold him in contempt of Congress or even impeach him.