At issue was whether the CIA should break its silence about its role in Benghazi, Libya, to counter criticism that increasingly was being leveled at the agency and Mr. Petraeus, said senior officials involved in the discussions.

Mr. Petraeus wanted his aides to push back hard and release their own timeline of the Sept. 11 attacks on the U.S. diplomatic compound in Benghazi and a nearby CIA safe house, seeking to set the record straight and paint the CIA’s role in a more favorable light. Mr. Clapper and agencies including the Pentagon objected, but Mr. Petraeus told his aides to proceed, said the senior officials.

By all accounts, the driving force behind Mr. Petraeus’s departure last Friday was the revelation about his extramarital affair with his biographer. But new details about Mr. Petraeus’s last days at the CIA show the extent to which the Benghazi attacks created a climate of interagency finger-pointing. That undercut the retired four-star general’s backing within the Obama administration as he struggled with the decision to resign…

On more substantive issues, agency officers sometimes chafed under what they saw as Mr. Petraeus’s more controlling style, the former official said. In his efforts to more closely align the CIA’s drone program, aimed at killing terror suspects, with diplomatic sensitivities, Mr. Petraeus sometimes clashed with the agency’s Counterterrorism Center chief, with Mr. Petraeus denying requests to strike a particular target.