Senior Scotland Yard police officers leaked stories to the media, former commissioner Sir Paul Stephenson has told the Leveson media inquiry.
He said that "a very small number" of senior officers leaked stories, which was "deeply unhelpful" to the Met's work.
"A dialogue of disharmony" was created by officers talking to the press "about things that ought to have been kept confidential", he said.
Stephenson also said that officers found themselves "obsessed" by bad headlines.
Stephenson resigned from the Metropolitan Police in July after he was criticised for hiring former News of the World executive editor Neil Wallis as a PR consultant, and for accepting free accommodation at a luxury health spa worth thousands of pounds.
An inquiry subsequently found Stephenson was not guilty of any wrongdoing.
He said that ill health was a factor in his resignation, and that while he had "a duty and honour" to leave office he might not have quit if he had been well.
"Had I not had the health issue, without wishing to overplay it, I might have come to a different conclusion," he said.
In his written statement to the inquiry Stephenson wrote:
"There were frequent newspaper stories of disharmony within the MPS senior management. I believed it was likely that some of this reporting emanated from a small number of self-interested officers, who either leaked to the media themselves or gossiped to others who did. Accordingly I made it a priority of my commissionership to ensure that this behaviour did not continue."
He also said:
"I believe the occurrence of leaks from senior officers substantially reduced during the period of my Commissionership. It is also worth observing, as I pointed out at Metropolitan Police Authority (MPA) meetings, that there was a culture of unofficial briefings, gossiping and leaking by people associated with the police but from outside the MPS, who were often referred to in the press as a ’police source’. I considered this to be one of the most disappointing and frustrating aspects of public life in London."
Sir Paul also revealed that Johnson's deputy, Kit Malthouse, complained that Scotland Yard allocated too many resources to the new phone-hacking investigation, called Operation Weeting, launched in January 2011.
He said in his statement: "On several occasions after Operation Weeting had started and I had returned from sick leave, the chair of the MPA (Metropolitan Police Authority), Kit Malthouse, expressed a view that we should not be devoting this level of resources to the phone-hacking inquiry as a consequence of a largely political and media-driven 'level of hysteria'."
Commenting on Malthouse's comments, Sir Paul said: "The reality was that this was wrong but that was a fairly widely held view."
He added: "I think that came together to create this very closed mindset that was defensive in nature which meant we didn't adopt a challenging mindset which is the best way to conduct an inquiry."
Sir Paul said he did not read a Guardian article in July 2009 claiming the Met's original phone-hacking inquiry was inadequate.
He said: "It was just yet another headline - I don't mean to say it dismissively - some noise about an event that I expected someone to pick it up and deal with it."
Former assistant commissioner John Yates was criticised for not reopening the phone-hacking investigation in the light of the Guardian story, which revealed the illegal practice was far more widespread than previously believed.
Sir Paul said a "defensive mindset" regarding phone-hacking set in very early, adding: "That stopped us going back and challenging what was the reason for the original investigation."
The former Scotland Yard commissioner also told the inquiry that leaks by top officers to journalists were "galling".
Prime Minister David Cameron set up the Leveson Inquiry last July in response to disclosures that the News of the World hacked murdered schoolgirl Milly Dowler's phone after she disappeared in 2002.
The first part of the inquiry, sitting at the Royal Courts of Justice in London, is looking at the culture, practices and ethics of the press in general and is due to produce a report by September.
The second part, examining the extent of unlawful activities by journalists, will not begin until detectives have completed their investigation into alleged phone hacking and corrupt payments to police, and any prosecutions have been concluded.
The inquiry will also hear from Elizabeth Filkin, author of a report into relations between the Metropolitan Police and the media that advised officers to avoid "flirting" and accepting alcohol from journalists.
Roger Baker, from Her Majesty's Inspectorate of Constabulary, will give evidence about his 2011 review of police relationships.
Baker's review found corruption was not endemic but that there was a "hugely inconsistent approach" across forces in their attitude towards free gifts.
Suggested For You
SUBSCRIBE AND FOLLOW
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements.Learn more