Tony Blair has told the Leveson inquiry that Rupert Murdoch did not lobby him directly over media policy when he was prime minister and highlighted examples where his government had gone against the News Corporation founder's wishes.

Blair said on Monday that he and Murdoch had "a working relationship until after I left office". After this they became closer and Blair was godfather to Murdoch's daughter Grace, he added.

He told Lord Justice Leveson that Murdoch "didn't lobby me on media stuff", but said that was "not to say we weren't aware of the positions their companies had", in particular his strong views in opposition to European integration.

But he said on regulatory matters affecting Murdoch's business directly, "we decided more often against than in favour".

Lance Price, former Labour and No 10 press officer, had previously described Murdoch as the "24th member of the cabinet".

Blair said: "Am I saying he's not a powerful figure in the media? Well no, of course he is, and, of course you're aware of what his views are, and that's why I say part of my job was to manage the situation so that you didn't get into a situation where you were shifting policy.

"I would say very strongly we managed the position that I believed in on Europe and that was a position the Sun and the News of the World frequently disagreed with me on."

On his relationship with Murdoch, Blair said: "Europe was the major thing that he and I used to row about. I believed in what I was doing, I didn't need him or anyone else to tell me what to do."

Robert Jay QC, counsel to the inquiry, said Price had also said he had been told Blair would never change policy on Europe without talking to Murdoch first.

He replied: "No we would never have given an assurance to Mr Murdoch or anybody else that we were not going to change policy without seeking their permission. That's absurd.

"Having said that, if we were about to engage in a major change of policy on an issue that mattered to any particular media group we would probably have tried to prepare the way for it, but I think that is perfectly sensible and there's nothing wrong with that."

Blair also said that his relationship with Murdoch changed after he stepped down as prime minister in 2007. "So I know there has been all this stuff about me being godfather of one of his children. I would never have become a godfather of his children on the basis of my relationship in office. After I left, I got to know him and his family and the relationship can be easier and better," he said.

He added that it was easier to become friendly after he left No 10 because there was not "the same pressure" as existed in office and because both men had similar international political interests.

Blair also confirmed he sent Rebekah Brooks a message of support immediately after she resigned as chief executive of News International in the wake of the Milly Dowler phone-hacking revelations.

"I'm somebody who doesn't believe in being a fair-weather friend and certainly I said I was very sorry for what happened to her and ... I don't know anything about the facts of the particular case but I have been or seen people go through these situations," he said.

Responding to Price's claim that he cosied up to Murdoch to the extent that he was an unofficial member of his cabinet, Blair listed six occasions in his written evidence on which the government had gone against the News Corp chairman and chief executive's wishes during his time as prime minister.

They included BSkyB's aborted attempt to buy Manchester United, the establishment of media regulator Ofcom, successive increases in the cost of the licence fee and expansion of the BBC's channels and online offering.

Blair said the government had blocked BSkyB's purchase of Manchester United after referring it to the Office of Fair Trading, which subsequently referred it to the Monopolies and Mergers Commission.

He said BSkyB had opposed the increase in the BBC's licence fee, which successive Blair governments raised from £91.50 in 1997 to £135.50 in 2008, above the rate of inflation and "in the face of significant opposition".

Blair added the BBC had also been granted permission by his government to launch new digital channels, which BSkyB had also opposed.

On media regulator Ofcom, Blair said in his written evidence: "In Ofcom we introduced a broadcast regulator [which] put Sky under far greater scrutiny than ever before".

He also said, under his premiership, the government had "stopped [News Corp] buying ITV" and said Sky had "opposed listed events for sport. We protected and extended them".

• To contact the MediaGuardian news desk email editor@mediatheguardian.com or phone 020 3353 3857. For all other inquiries please call the main Guardian switchboard on 020 3353 2000. If you are writing a comment for publication, please mark clearly "for publication".

• To get the latest media news to your desktop or mobile, follow MediaGuardian on Twitter and Facebook.