REBEKAH Brooks sent a personal text message to David Cameron claiming they were "in this together" and suggesting a "country supper" on the eve of a crucial Conservative Party speech.
Mrs Brooks, the former boss of Rupert Murdoch's newspaper group, told the Prime Minister she was "rooting" for him in both a personal and professional sense ahead of his party conference speech in autumn 2009.
She also echoed the campaign slogan of US President Barack Obama by telling him "yes, he Cam!".
Mr Cameron has come under pressure over his links with Mrs Brooks, an ex-editor of the News of the World, since it emerged phone-hacking was widespread at the newspaper. She is due to stand trial on charges of perjury related to the police investigation into the scandal.
The text message disclosed to the Leveson Inquiry will be seen as further evidence Mr Cameron had a very close relationship with Mrs Brooks.
The message also conveys Mrs Brooks' disappointment that the Prime Minister did not turn up to a party organised by The Times newspaper.
She suggests a "country supper" to talk about the issue, as their families live near to each other in Chipping Norton, Oxfordshire.
The first line of the message is redacted because it was deemed "not relevant".
It goes on to read: "But seriously I do understand about the Times. Let's discuss over country supper soon. On the party it was because I had asked a number of NI (News International) to Manchester post endorsement and they were disappointed not to see you. But as always Sam was wonderful and I thought it was EO's were charm personified!)
"I am so rooting for you too not just as a personal friend but professionally were definitely in this together! Speech of your life? Yes he Cam!"
Mr Cameron told how he got to know Mrs Brooks because of "her role in the media, my role in politics". It got "stronger" when she married Charlie Brooks, who was a neighbour of Mr Cameron.
The Prime Minister said they talked to each other on the phone "quite a bit" but could not remember how often they saw each other socially.
"I don't think every weekend, I don't think most weekends but it would depend," he said. "I was definitely seeing her more often because my friendship with Charlie as a neighbour. We play tennis together and all sorts of other things."
Earlier Mr Cameron said the Conservative Party had never made secret deals on a "nod and a wink" with Rupert Murdoch.
The Prime Minister admitted he tried to win support from Mr Murdoch's newspapers during at least 10 meetings in the run-up to the election.
But he said it was "nonsense" that the Tories ever traded policy in return for favourable coverage from Mr Murdoch's Sun and Times titles.
He told the inquiry his party had no idea that Mr Murdoch would try to buy BSkyB straight after the 2010 election, so it could never have been the subject of a grand bargain.
"This idea of overt deals, this idea that somehow the Conservative Party and News International got together and said, 'You give us your support and we'll waive through this merger', that by the way we didn't even know about at that stage, I think the idea of overt deals is nonsense," he said.
Neither was there any "covert" understanding with Mr Murdoch that the deal would be pushed through with a "nod and a wink", he said.
The Prime Minister did defend his right to see newspaper editors to "win over his newspapers and put over opinions".
But he said most of his conversations with Mr Murdoch had been about "economic issues and geopolitical issues".
His evidence showed a further 15 meetings with Mr Murdoch's son James and around 19 with Rebekah Wade, the former boss of News International.
He also flew out to Santorini, a Greek island, in August 2008 to meet several members of the family at the suggestion of Matthew Freud, Mr Murdoch's son-in-law, because it seemed like a "good opportunity".
James Murdoch subsequently gave him advance warning in September 2009 that The Sun would switch support to the Conservative Party during the Labour Party conference.
Despite defending his right to court newspaper tycoons, Mr Cameron admitted that the relationship between press and policians had "gone wrong".
"I think it has been too close and I think we need to get it on a better footing," he said.
The Prime Minister said the Leveson Inquiry had created a "cathartic moment" for policians, journalists and police to "reset" this relationship.