Andy Coulson, the former editor of the News of the World, told David Cameron and George Osborne that his News International background "could not be seen as a factor" in guaranteeing the support of those newspapers.
Speaking at the Leveson Inquiry, Coulson, who went on to become Cameron's director of communications in 2007, said it had not been suggested by Cameron or Osborne, but he explained to them that his background at News International would not be a key to support.
"I do remember explaining that my News International background should not therefore be seen as some sort of guarantee of the support of either of those papers," he said.
"I'm not sure that David Cameron ever said to me 'Have we got the News of the World in the bag, Andy?'.
"I think this is a conversation that I introduced."
Coulson said they had tried to talk to as many newspapers as possible, as the Tories had an "electoral mountain" to climb.
He said Cameron had a "family connection" with former News International executive Brooks.
"She was his constituent. Charlie Brooks is a constituent of his, so they lived relatively close to his constituency home but there was, I think, a fairly long historic family connection."
Coulson said he was approached by Osborne over the Tory communications job in March 2007 - just two months after his resignation.
They met for a drink at a London hotel, according to his statement.
"Having never considered a career in politics I was initially reluctant, but became more intrigued as the conversation went on," Coulson said.
"I believe David Cameron called me later that night to say that Osborne had told him of our conversation and that he would like to meet."
They did so soon afterwards in Cameron's parliamentary rooms as leader of the Opposition.
Discussions then "stalled" during the local election campaign, but restarted towards the end of May.
In one key conversation, Cameron asked Coulson about the case involving Goodman and private investigator Glenn Mulcaire.
"I was able to repeat what I had said publicly, that I knew nothing about the Clive Goodman and Glenn Mulcaire case in terms of what they did," he told the inquiry.
OPINION: Scroll down to leave your comments
Coulson also dismissed rumours that he kept a potentially explosive diary of his time in the job and played down the closeness of his relationship with Rupert Murdoch - his boss while editor of the News of the World.
Asked by Robert Jay QC, counsel for the inquiry, whether he had kept a diary between 2007 and his departure from Downing Street in 2010, Coulson replied that he had not.
However, he did say there were "notes that I would take in the course of my work both in opposition and in government".
Coulson said he had "thoroughly enjoyed" working for Murdoch until he was forced to resign by the conviction of News of the World royal reporter Clive Goodman for phone hacking, adding that the former editor said the media mogul had been "warm and supportive", but he said he did not want to "overplay" their relationship.
Coulson also said he still classed former News International chief executive Rebekah Brooks as a friend, but added: "We haven't spoken for a while for obvious reasons."
In a written statement, he said during various meetings with politicians support by the now-defunct Sunday tabloid was not discussed.
"At no point in any of these conversations was the potential support of the News of the World or any other News International titles discussed and nor indeed were any commercial issues."
In his witness statement, Coulson described a meeting with Gordon Brown in 2006.
The then-chancellor told him he had it on "very good authority" that Rupert Murdoch was planning to make him editor of The Sun when Ms Brooks was promoted.
"I came away thinking it was an attempt by Mr Brown to impress on me his closeness to Rupert Murdoch. I didn't believe it," he said.
He described contacts with Osborne at the Conservative conference in Blackpool in 2005.
But he rejected the idea that Osborne had received soft treatment when a story emerged of his behaviour as a student.
Coulson pointed out that the NotW ran the story with the headline, "Top Tory, coke and the hooker".
"The idea that we somehow went easy on him is quite clearly ridiculous when you look at the paper," Coulson said.
Coulson said that after he quit the NotW in 2007 he received messages of commiseration from Tony Blair and Gordon Brown.
Asked if he was also contacted by Mr Cameron, he replied: "I don't remember doing so."
Coulson left Downing Street in 2011 after repeated allegations concerning phone hacking at the newspaper under his editorship.
Coulson has previously insisted he was unaware that employees at the paper were involved in the hacking of voicemails.
Having looked at the close relationship between the media and the police, Lord Justice Leveson has turned the focus of the inquiry onto ties between the media and politicians.
Politicians, including the current Prime Minister, have been accused of becoming too close with Fleet Street and Rupert Murdoch's News International in particular.
Earlier, Lord Rothermere, the owner of the Daily Mail, gave evidence to the inquiry, as did John Mullin, the former editor of the Independent. Mullin was forced to explain his decision to publish a story about Coulson that contained details from his witness statement to the Leveson Inquiry.
During the opening of the third module of the inquiry, dealing with relations between media figures and politicians, Jay suggested that Rupert Murdoch had suffered "selective amnesia" when he claimed to have forgotten a key lunch with Margaret Thatcher.
More:Andy Coulson David Cameron Andy Coulson Phone Hacking Scandal Andy Coulson Phone Hacking David Cameron
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