The resignation statement from the United States attorney in Manhattan was blunt: “I hope that my fight for independence will make it easier for my successor to withstand the harsh, narrow partisan views on law enforcement currently in favor at the Department of Justice in Washington.”

Was that written by Preet Bharara, the longtime prosecutor who was fired on Saturday by the Trump administration?

No, those words came from Robert M. Morgenthau, who served in the same post for nearly a decade before he said he was given an ultimatum by the administration of President Richard M. Nixon, a Republican, in 1969: Resign, or be fired.

After some resistance, Mr. Morgenthau, then 50, finally agreed to step down.

The parallels between the two men’s departures nearly half a century apart from the same office — United States attorney for the Southern District of New York — do not end there.