David Cameron texted Rebekah Brooks telling her to "keep her head up" in the week that she resigned as chief executive of News International, it has been alleged.
The Prime Minister told Mrs Brooks she would get through her difficulties just days before she stood down over the phone hacking scandal, an updated biography of Mr Cameron discloses.
The contact between the pair then came to an abrupt halt, the book, Cameron: Practically A Conservative, claims.
The biography, serialised in The Times, also details how the pair would often pop round to one another's houses in south Oxfordshire.
"The wider public might have liked to know too of the text message that Charlie Brooks told friends Cameron sent to Brooks at the beginning of the week in which she resigned, telling her to keep her head up and she'd get through her difficulties," authors Francis Elliott, of The Times, and James Hannin, of the Independent on Sunday, say.
"Such contact came to an abrupt halt soon afterwards, with Brooks not wanting to embarrass Cameron and he wanting to be able to say, hand on heart, that they had not been in touch.
"But it was claimed that Cameron did send an emissary to Brooks to mitigate his sudden coldness towards her.
"The gist of the message was 'Sorry I couldn't have been more loyal to you as you have been to me, but Ed Miliband had me on the run'."
The revelations come just days before Mrs Brooks and former Number 10 communications director Andy Coulson are expected to make embarrassing revelations about British politicians' attempts to woo Rupert Murdoch's newspapers.
There is speculation that the Leveson Inquiry could release emails and text messages sent between Mr Cameron and Mrs Brooks.
Mrs Brooks has kept all the texts she received from the Prime Minister, of which there could have been more than 12 a day, according to Daily Telegraph columnist Peter Oborne.
Mr Coulson will appear before the inquiry tomorrow, followed by Mrs Brooks on Friday, and their potentially explosive evidence could overshadow Mr Cameron's efforts to relaunch the coalition's programme after bruising local election results for the Conservatives and Lib Dems.
Mrs Brooks is likely to disclose further details about her close relationship with the Prime Minister, while Mr Coulson will speak about how he came to be appointed the Tories' top spin doctor.
Eight Cabinet Ministers - including Mr Cameron, Deputy Prime Minister Nick Clegg and Culture Secretary Jeremy Hunt - were last week given the right to see Leveson Inquiry documents and witness statements in advance.
Lord Justice Leveson agreed to make them "core participants" - people who have a significant interest in the hearings or may face criticism.
Mrs Brooks, 43, edited the News of the World and The Sun before becoming chief executive of Mr Murdoch's UK newspapers division News International in September 2009.
She and racehorse trainer husband Charlie are key members of the influential Chipping Norton set, which also includes Mr Cameron and his wife Samantha, Top Gear presenter Jeremy Clarkson, and Mr Murdoch's daughter Elisabeth and her PR guru husband Matthew Freud.
The inquiry has already heard that Mrs Brooks regularly met Mr Cameron and other top politicians along with Rupert and James Murdoch.
She hosted a Christmas dinner on December 23 2010, just two days after Business Secretary Vince Cable was stripped of his responsibility for media takeovers for saying he had "declared war" on the Murdochs' News Corporation empire, and her wedding on June 13 2009 was attended by Mr Cameron and then prime minister Gordon Brown.
Mr Cameron said in March that he rode a retired police horse loaned to Mrs Brooks by Scotland Yard from 2008 to 2010.
Mrs Brooks has twice been arrested by Scotland Yard detectives investigating allegations of phone hacking, corrupt payments to public officials, and an attempt to pervert the course of justice. She was bailed and has not been charged.
The Leveson Inquiry's lawyers will not question Mrs Brooks or Mr Coulson about anything that could prejudice the continuing police investigation into phone hacking or any potential future trials.
Today the inquiry will hear from Martin Clarke, editor of the Mail Online, and from officers about police corruption investigations at Scotland Yard and Devon and Cornwall Police.
Further evidence tomorrow will come from Lord Rothermere, chairman of Daily Mail and General Trust, which owns the Daily Mail and Mail on Sunday.
Mr Cameron set up the Leveson Inquiry last July in response to revelations that the now-defunct 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 October.
Lord Justice Leveson indicated last week that the second part, examining the extent of unlawful activities by journalists, may not go ahead.
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