Blair also told Lord Justice Leveson that he has a unique opportunity to at last "drain the poison" from the media with his inquiry into press ethics.

The former Labour prime minister, who towards the end of his time in office in June 2007 branded the media as being like a "feral beast tearing people and reputations to bits" in a speech, said on Monday morning he now felt more comfortable talking about the sometimes unassailable power that newspapers hold without responsibility.

Blair said in his witness statement to the inquiry "certain newspapers are used by their owners or editors as instruments of political power ... in which the boundary between news and comment is deliberately blurred".

He told Robert Jay QC, counsel to the inquiry: "The Sun and the Mail frankly are the two most powerful of the papers, and the Sun in particular because it is prepared to shift, it makes it all the more important."

Blair said as a political leader the problem was, with certain parts of the media, that it "becomes not merely politically partisan in their comment or editorial line but in their news coverage".

"I say to you, emphatically, this is not confined to the Murdoch media. I'm not saying the Murdoch newspapers, the tabloid ones, did not have that characteristic – they do – but they're not the only ones by any means at all," he added.

"I think you'd say the bulk of what we call the tabloid press basically writes in a way that if they're against a particular policy, party or person, it's a pretty all-out affair."

Once a newspaper took against a particular politician or party, said Blair, "It's a full-on, full-frontal day in, day out ... basically a lifetime commitment".

He added this gave the media a power which he believed was "unhealthy and which I have felt through my time uncomfortable with".

Blair was read a line by Jay from a Daily Mail editorial which said the media had acted towards him like a "great sloppy labrador that repeatedly bestowed its affections" on him, rather than the former PM's own description of the fourth estate as a "feral beast".

"It's a description of the Daily Mail that I don't totally recognise," he replied, to laughter from the court. "I have to say, yeah, interesting that one. I haven't come across that before but I'm the one with the self delusion am I?"

Blair said the Daily Mail was a "subject on which I couldn't claim to exercise much objectivity".

"The fact is when you fall out with the controlling element of the Daily Mail that is when you are going to be subject to a huge and sustained attack," he added. "The Daily Mail, for me, they've attacked me, my family, my children, those people associated with me, day in, day out. Not merely when I was in office but subsequent to it as well. That is, and they do it very well, very effectively. It's very powerful."

Blair said he had asked his office to analyse 50 Daily Mail stories about him after the 2005 general election, and 50 stories just prior to his departure from Downing Street. He said all 100 were negative.

On Murdoch, Blair said he would "never describe him – I'm indicating my own political prejudices here – as a sort of tribal Tory. I wouldn't say that at all. You know he has a bit of him that is very anti-establishment, meritocratic I would say".

Asked whether Murdoch's titles reflected his commercial interests in their coverage, Blair said: "I think what I'm really saying here is yeah, of course, like any commercial organisation they'll have their commercial interests but I also point out in my statement, and I will say this very strongly, actually we did more stuff against the Murdoch interests than we did in favour of it.

"Now did that mean they changed their support for me? No it didn't as a matter of fact even though we did things they're really didn't like."

Blair said Leveson now had an opportunity to change the relationship between the media and politicians.

"It is the draining of the poison from the culture that is the real challenge, a challenge deepened by the arrival of social media and one not at all confined to the UK," Blair said. "This is a debate that is now permissible, and you have the potential to get a solution so let's hope we can get one."

On fears over the implications of statutory regulation of the media, Blair said: "The notion that it's impossible to find a space between no proper system of accountability and the press becoming a wholly owned subsidiary of the government, that is an assertion that is frankly ludicrous."

Jay put it to Blair that what he did was imbue politics with "a degree of cynicism" or "a disposition to be malleable with the truth".

Blair denied the accusation. "I cannot believe we are the first and only government that has ever wanted to put the best possible gloss on what you're doing … This is a completely different thing from saying that you go out to say things that are deliberately untrue or you ... harass journalists," he said.

Blair said he decided to "manage" the media rather than fight them.

"You would have had virtually every part of the media against you and I felt the price you would have put would push out the things that you cared about," he added, referring to Labour social and education policies.

• To contact the MediaGuardian news desk email editor@mediaguardian.co.uk 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.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.