LONDON — He's hobnobbed with every British prime minister of the last 30 years but says he wields no undue political influence. His scandal-loving tabloids strike fear into the hearts of decision-makers, but he denies ever using his newspapers to advance his commercial interests.

LONDON — He's hobnobbed with every British prime minister of the last 30 years but says he wields no undue political influence. His scandal-loving tabloids strike fear into the hearts of decision-makers, but he denies ever using his newspapers to advance his commercial interests.

Media mogul Rupert Murdoch cast himself as the very model of a modest, upright newspaperman Wednesday, insisting in a London courtroom that any suggestion to the contrary was based on lies and legends.

Here was his chance, he said before a judge, to set the record straight: that for all the talk of his political clout through publications like the mass-market Sun, he never took advantage of it, and that he expects those who work for him to adhere to high ethical standards.

"That is a complete myth, that I used the influence of the Sun or supposed political power to get favorable treatment," Murdoch testified, declaring, "I've never asked a prime minister for anything."

And as for allegations of corporate misdeeds, "I try very hard to set an example of ethical behavior, and I make it quite clear that I expect it," the Australian-born billionaire said.

Forget that the reason he was summoned to appear in court in the first place was because of the phone-hacking scandal engulfing his giant News Corp., which sparked a judicial inquiry into media practices. Or that dozens of journalists at Murdoch-owned papers have been arrested in wide-ranging investigations into illegal reporting methods, including bribing police.

The man at the top remained unruffled at the inquiry through four hours of questioning on his media empire and its effect on public life here in Britain, where Murdoch, 81, owns several national newspapers, including the Sun, the Times of London and the Sunday Times.

He said he didn't condone hacking into cellphones or hiring private investigators to ferret out information, two tactics that appear to have been used on an almost industrial scale at his now-defunct weekly News of the World.

"It's a lazy way of reporters not doing their job properly," said Murdoch, who shut down the tabloid in July, after it emerged that the paper had illegally accessed voice-mail messages left on the phone of a kidnapped 13-year-old girl.

He launched a new weekly tabloid, the Sun on Sunday, this year.

Murdoch also told the court that his political influence in Britain has been vastly overstated, despite ample evidence of would-be prime ministers flying halfway around the world to try to win the support of his papers and his frequent back-door visits to 10 Downing St. over the years.

Indeed, even as he sat in the witness box, a political rumpus involving News Corp. was in full throttle in Parliament, caused by the testimony the day before of Murdoch's son James.

The inquiry produced evidence of potentially improper communications between a News Corp. lobbyist and the office of Jeremy Hunt, the government minister in charge of deciding whether to allow the company's controversial bid to buy British Sky Broadcasting to go forward.

A special adviser to Hunt passed along sensitive information to the lobbyist and implied that Hunt, supposedly an impartial arbiter, was actively trying to help News Corp.

The adviser resigned Wednesday; the opposition Labor Party has called for Hunt to follow suit. He was forced to appear before a raucous House of Commons to defend his handling of the BSkyB bid, which he said went completely by the book before News Corp. abandoned its effort because of the hacking scandal.

Any suggestion that "there was a back channel" through which News Corp. influenced his decisions "is categorically not the case," Hunt told lawmakers, some of whom heckled him.

Murdoch had an easier time of it in the courtroom, even though his empire is now under siege.

He raised eyebrows among his listeners with his assertion that he essentially never offered politicians the endorsement of his newspapers with strings attached — for example, in exchange for favorable consideration of his BSkyB bid. It was natural that officials sought him out to try to get their message across, he said, but his business interests did not color his decisions on whom to back.

"I take a particularly strong pride in the fact that we have never pushed our commercial interests in our newspapers," Murdoch said.

Murdoch is to take the stand again today, probably to answer more questions on the phone-hacking scandal and News Corp.'s bid for control of BSkyB.

He happily dished on the prime ministers he has known, professing to be an admirer of Margaret Thatcher of the Conservative Party (who approved his bid to buy the Times of London) and to have spoken on many occasions with Tony Blair of the Labor Party (whose push for the invasion of Iraq he heartily supported).

Blair flew to Australia to try to win Murdoch's backing before elections in 1997 — successfully, it turned out. The current prime minister, David Cameron, visited with the media magnate on a yacht in the Mediterranean.

Murdoch described Cameron as a "good family man," because he noticed at a social gathering that the British leader took good care of his young son.

Murdoch was less flattering about Cameron's predecessor, Gordon Brown, describing him as an unbalanced man who pledged "to make war" on News Corp. when Murdoch said his papers would call for a change of government at the next election.

"I said, 'I'm sorry about that, Gordon, thank you for calling.' End of subject," Murdoch told the court. Brown issued a denial of that conversation to the BBC.

This is the second time in nine months that he has faced a public grilling in Britain. In July, he and James were called to appear before a parliamentary committee.

Despite the hacking scandal, Murdoch said he remains a lover of newspapers and summed up his journalistic mission this way:

"Always to tell the truth, certainly to interest the public, to get their attention, but always to tell the truth."