​Former CIA Director Leon Panetta says that he was cursed at by President Barack Obama’s former chief of staff after he agreed to cooperate with the Senate’s investigation into his agency’s torture tactics in the wake of 9/11.

In passages taken from his new book and published online by the Intercept, Panetta explains the event that triggered the outburst, which flowed from the former chief of staff Rahm Emanuel, a man notorious for his profanity-laced tirades.

READ MORE: Panetta accuses Obama of rushing retreat from Iraq at all costs

During his tenure between 2009 and 2010, Panetta said he struck a deal with Sen. Diane Feinstein (D-Calif.) – the Chair of the Senate Intelligence Committee – allowing lawmakers access to CIA documents detailing the controversial enhanced interrogation techniques and extraordinary rendition practices it employed during the George W. Bush administration.

Shortly after doing so, however, Panetta experienced resistance from White House officials, most notably from Emanuel.

“I was summoned down to a meeting in the Situation Room, where I was told I would have to ‘explain’ this deal to Rahm… It did not take long to get ugly,” Panetta wrote in “Worthy Fights: A Memoir of Leaders in War and Peace.”

“’The president wants to know who the f**k authorized this release to the committees,’” Rahm said, slamming his hand down on the table. ‘I have a president with his hair on fire, and I want to know what the f**k you did to f**k this up so bad!’”

Dennis Blair, the director of national intelligence at the time, defended Panetta, saying the real cause for concern should be the individual who instigated such a response from Obama in the first place.

“’If the president’s hair is on fire,’ he retorted, ‘I want to know who the f**k set his hair on fire,’” Panetta recalled Blair saying.

The tenures of both Panetta and Blair ended in 2010 – Blair was reportedly fired over “distrust” between his staff and the White House – but Katherine Hawkins of the transparency organization Open the Government told the Intercept that Panetta’s story is especially revealing considering the Senate torture report has yet to be published.

READ MORE: White House accidentally leaks post-9/11 CIA torture report findings

The completed report – which, through leaks, is understood to be quite critical of the CIA’s behavior – was supposed to be released months ago. However, lawmakers say they are still battling with the White House over what redactions to make. According to Feinstein, the White House is withholding important facts, and in August she said she would not approve its release until the administration works with her on the issue.

“I have concluded the redactions eliminate or obscure key facts that support the report’s findings and conclusions," she said. "Until these redactions are addressed to the committee’s satisfaction, the report will not be made public."

A leaked White House document in July suggested the report categorizes the CIA’s techniques as “torture by a common definition.”

The document also stated that the State Department wishes to maintain that the report "leaves no doubt that the methods used to extract information from some terrorist suspects caused profound pain, suffering and humiliation. It also leaves no doubt that the harm caused by the use of these techniques outweighed any potential benefit."

The debate over redactions isn’t the only issue that has separated senators from the White House when it comes to the so-called torture report, though. Over the summer, the CIA admitted that it spied on lawmakers as they conducted their investigation – despite the fact that agency director John Brennan previously denied the allegation.