By Kate Holton and Mohammed Abbas
LONDON (Reuters) - When the former editor of the newspaper at the heart of Britain's phone hacking scandal appears this week at a media inquiry, Prime Minister David Cameron may have more to worry about than the paper's proprietor, Rupert Murdoch.
Cameron's judgment will be under scrutiny when his friend and former News of the World editor Rebekah Brooks is quizzed at an inquiry he reluctantly ordered to investigate the relationship between the media, politicians and the public.
The inquiry has already produced evidence that a special adviser to one of Cameron's ministerial allies gave advice to Murdoch's News Corp as it tried to buy the rest of the lucrative pay-TV firm BSkyB it did not already own.
Now Cameron's own ties - possibly including text messages and emails - to Brooks and Andy Coulson, another Murdoch editor who later became Cameron's spokesman, could be placed under the spotlight, adding to the perception that Britain's leaders were far too close to Murdoch's media empire.
"It's a worry because you just don't know what's there," one lawmaker from Cameron's party told Reuters, speaking on condition of anonymity because of the political sensitivity. "I think it could be very difficult. I don't know any more than the next person but I do have a sense that it is going to be difficult."
Cameron has apologized for getting too close to Rupert and James Murdoch, and they have in turn apologized for their slow reaction to the hacking into voicemail of public figures and a murdered schoolgirl.
But the impression that the prime minister and finance minister George Osborne surrounded themselves with a coterie of privileged individuals for cozy dinners and horse riding in the British countryside has been pounced on by critics.
The timing is bad for Cameron, coming soon after a budget that cut tax rates for the rich and a series of political missteps.
"One of the problems that Cameron and Osborne have is that the budget played into a storyline of them looking after their mates," opposition Labour MP Chris Bryant, a critic of Cameron and Murdoch, said. "And some of their mates, it turns out, were James and Rupert Murdoch and Rebekah and Andy Coulson."
Brooks will be asked at the Leveson Inquiry about her long friendship with Cameron and whether this deterred the police from initially investigating allegations of criminality at the Sunday tabloid she used to edit, the News of the World.
The Telegraph newspaper has reported that Cameron texted Brooks up to 12 times a day, while the Times, quoting from a new biography of Cameron, reported on Wednesday that he had texted her before she quit to tell her to "keep her head up".
Brooks has said it was Osborne's idea to appoint Coulson as Cameron's spokesman. Coulson, who has said nothing in public since his arrest in connection with the phone hacking investigation last July, will appear before judge Brian Leveson on Thursday. Brooks will appear on Friday.
"It would be fair to say that the timing is unhelpful," one senior Conservative member of parliament said.
"It clearly contributes to the run of difficult news stories, going from the budget through to local elections and now Leveson," he said, referring to last week's elections where the government suffered big losses.
An appearance by the Murdochs at the inquiry last month revealed how a ministerial aide inappropriately sought to help News Corp buy the rest of BSkyB.
The special adviser to Culture Minister Jeremy Hunt immediately resigned, but many believe that Hunt himself, who is also due to testify to the Leveson Inquiry, should go.
The details about Hunt came from an exchange of text messages and emails between James Murdoch and his top lobbyist, and it is the likely publication of contacts between Brooks and Cameron that has many in the Conservative Party worried.
The Times said the two had met at social events in their well-heeled town of Chipping Norton, texting each other beforehand to make sure they were not seen together in public.
Brooks, instantly recognizable for her long red hair, has been arrested on suspicion of phone hacking, bribing a public official and conspiracy to pervert the course of justice.
Dubbed by some the "fifth daughter" of Rupert Murdoch, she edited the News of the World from 2000 to 2003 and went on to edit the Sun daily tabloid for six years before stepping up to run Murdoch's British newspaper arm from 2009 to 2011.
Cameron has admitted socializing with Brooks, together with James Murdoch and others over Christmas in 2010, as the government was deciding whether to approve the takeover of BSkyB.
And in one of the most humiliating aspects of the long-running saga, Cameron had to admit he had ridden a horse with Brooks' husband, who is also an old school friend. The horse was given to Brooks by the police and was seen as a symbol of the extremely close ties in the upper echelons of the establishment.
"It's going to be Chipping Norton and horses and he will be asked once again about Raisa the horse," said Brian Cathcart, a journalism professor and a founder of the Hacked Off group which campaigned for the public inquiry into press standards.
"He just really doesn't want to go there."
Cameron's spokesman refused repeated requests for comment, as did a spokeswoman for Brooks.
(Writing by Kate Holton and Guy Faulconbridge; editing by Janet McBride)