David Cameron gives evidence to the Leveson inquiry into media ethics.

Prime Minister David Cameron is to testify at the Leveson inquiry into media ethics on Monday after revelations about cosy relationships between his government and Rupert Murdoch's media empire.

Mr Cameron told the inquiry that the relationship between press and politicians had been too close for 20 years, admitting that governments found it difficult to institute reform because they had a vested interest:

"We need to try to find a way for some independence to be brought to that," he said.

The prime minister should expect embarrassing questions about his relationship with former News International boss Rebekah Brooks who he often dined with, visited at her country home, and sent phone texts ending "LOL" - which Mr Cameron thought meant "lots of love".

A full day has been set aside to hear from Mr Cameron, who is also expected to be asked what measures - if any - he used to vet ex-News of the World editor Andy Coulson before hiring him as Downing Street's spokesman. Mr Coulson resigned from the newspaper amid the controversy surrounding the Murdoch phone hacking scandal.

Some press reports indicate Mr Cameron plans to come out fighting at the hearing today, ensuring Justice Leveson knows the government will not accept robust plans for press regulation that prevent freedom of speech. Mr Leveson has already said he wants his recommendations on press regulation to be backed by all political parties.

'War on Murdoch'

A spirited offence is unlikely to detract from questions about Vince Cable, the business minister initially in charge of examining Mr Murdoch's proposed bid for BskB, who told undercover reporters he had declared "war" on Rupert Mudoch.

The BskyB issue was subsequently handed to pro-Murdoch Culture Secretary Jeremy Hunt, another controversial decision, as Mr Hunt was in regular contact with Murdoch executives and had expressed his approval of the Murdoch takeover weeks before Mr Cable was relieved of his duties.

Mr Cameron has so far refused to investigate his culture minister's close relationship with Murdoch staff before and after Jeremy Hunt examined Mr Murdoch's £8bn bid for control of BSkyB. The takeover failed after hacking allegations against News of the World staff involving politicians including former Prime Minister Gordon Brown.

Mr Hunt, an Oxford graduate along with Mr Cameron and Chancellor George Osborne, has remained in his job, although his special adviser was forced to quit after revelations about hundreds of text messages, calls and meetings between Mr Hunt told the tribunal he ''acted properly'' at all times.

Read Gary Gibbon's blog: Where does the Hunt row leave the coalition? 

A Labour motion calling for Mr Hunt to be investigated over alleged breaches of the ministerial code in his handling of the Murdoch BSkyB bid was defeated in the House of Commons by 290 to 252.

Poor judgment?

Mr Cameron's appearance ends a week of high-profile testimony from two former prime ministers, the Labour leader and Scotland's first minister (see highlights of testimony below).

But it is Mr Cameron's judgment as well as his action that will be closely examined today for his handling of Mr Murdoch's bid and his personal relationship with Ms Brooks and her husband Charlie, a long-standing friend of the prime minister from their school days at Eton. The couple appeared in court on Wednesday, charged with perverting the course of justice during the phone hacking scandal.

Mr Cameron maintains he has acted properly and continues to support his decision on keeping Mr Hunt in his portfolio.

''The advice I was given was that what mattered was not what Jeremy Hunt had said publicly or privately but how he was going to conduct himself during the bid,'' Mr Cameron has said. "That's how I think we should judge him: did he adjudicate this bid wisely and fairly?"

''And he did," Mr Cameron continued. "He took legal advice at every stage, and he followed that legal advice and he did many things that were not in the interests of the Murdochs or BSkyB and that side of things."

Highlights from the week's testimony:

Gordon Brown, ex-Labour prime minister -
Mr Brown accused Mr Murdoch of lying under oath about claims Number 10 declared war on his media empire and denied he or his wife approved the publication of their son's illness.

Sir John Major, ex-Conservative prime minister -
Mr Major said Rupert Mudoch threatened to withdraw media support unless the government changed its policy on Europe when Mr Major was prime minister.

Ed Miliband, Labour leader -
Mr Miliband accused Murdoch's News of the World of breaking almost every Press Complaints Commission code while covering Madeleine McCann's disappearance in Portugal.

Harriet Harman, Labour deputy leader -
Ms Harman blamed newspapers with a sense of invincibility for creating the "ugly" culture that resorted in the abuse its power and phone hacking.

George Osborne, Chancellor -
Mr Osborne denied meeting Rupert Murdoch before the general election and said he would not support all of Justice Leveson's wide-ranging plans for press regulation.

Alex Salmond, Scotland's first minister
Mr Salmond told the inquiry his bank account was accessed - but not by the Murdoch media, by London's Observer newspaper. The Observer says there is no evidence to substantiate that claim.

Nick Clegg, deputy prime minister -
Mr Clegg said he met Rupert Murdoch twice ahead of the 2010 election but they exchanged only a few sentences.