Former prime minister Gordon Brown told Rupert Murdoch he had declared war on News Corp after The Sun withdrew their support from the Labour party, the media mogul told the Leveson inquiry.

Giving evidence to the inquiry into media ethics, the 81-year-old told the court he did not think Brown was in a "balanced state of mind" when he made the comments.

"Mr Brown did call me and said 'Rupert do you know what's going on here?'," Murdoch said, speaking of a phone call after The Sun announced they were backing the Conservatives in September 2009 during the Labour conference.

"I said 'what do you mean?'," Murdoch continued.

"He said 'well, The Sun, and what it's doing and how it came out.' I said: 'I'm not aware. I was not warned of the exact timing… But I'm sorry to tell you, Gordon, we have come to the conclusion that we will support a change of government when there's an election.'

"I must stress no voices were raised, we were talking more quietly than you and I are now. He said 'well, your company has declared war on my government. And we have no alternative to make war on your company'."

The media mogul said he was not a "Sun King" character who used charisma to influence his media empire.

"I try very hard to set an example of ethical behaviour and make it quite clear that I expect it," he said.

"One can describe that in a number of ways. But do I do it via an aura or charisma? I don't think so."

The News Corp chief also denied asking favours from the top of government, stressing: "I have never asked a prime minister for anything."

He also denied influencing editors on the Times and Sunday Times, adding he was "sorry to say" he "never much" interfered with the News of the World.

"If you want to judge my thinking, look at The Sun," he said.

Murdoch said he would use his two day appearance at Leveson to "put some myths to bed."

In a statement this afternoon, Gordon Brown said:

“Mr Rupert Murdoch has today made a serious allegation that in a telephone call when ‘The Sun’ declared for the Conservative Party, I told him I had declared war on his company.

He is wholly wrong.

As the Leveson Inquiry heard ‘The Sun’ declared for the Conservatives on the 30th of September, 2009. I did not phone Mr Murdoch or meet him, or write to him about his decision.

The only phone call I had with Mr Murdoch in the last year of my time in office was a phone call specifically about Afghanistan and his newspaper’s coverage of the war. This was in the second week of November after his newspaper, The Sun, printed a story in the second week of November about the death of a soldier and his mother’s complaints .