The job of leader of the opposition is often described as the loneliest in politics, but that doesn't seem to bother Ed Miliband.

Indeed, talking to the Observer the day after Lord Justice Leveson delivered his report calling for a system of independent regulation of the press, backed by statute, the Labour leader seems to relish the prospect of being savaged by most of the country's newspapers.

Political leaders on the way up normally court the most powerful figures in the media – Tony Blair was assiduous and David Cameron has been equally so. But since the phone-hacking scandal exploded last year, Miliband has seen virtue in precisely the opposite approach.

Much of the press applauded Cameron for rejecting Leveson's call for a law to guarantee his proposed regime of newspaper regulation, a response the prime minister hopes to use to spur editors into establishing the independent press watchdog he favours. Miliband backed the judge entirely and duly attracted opprobrium.

He lunges forward in his seat and glares, ready to explain himself. "Why does it need to be guaranteed by law? Because we have had 70 years, seven separate attempts, a history of self-regulation that has failed," he says.

As Miliband sees it, this is act two of a drama that began last summer and in which he plays the hero, the brave leader who shuns short-term self-interest as he tries to clean up relationships between politicians and magnates.

Miliband looks back to last July, when he did the unthinkable and declared war on Rupert Murdoch's empire. In an interview with this paper in July 2011, he even called for the Murdochs' business interests to be broken up. People told him then he would regret it. "They said Rebekah Brooks would stay in place at News International, that there would be no inquiries and that the News Corp takeover of BSkyB would all go ahead whatever. They were wrong on all three counts," he said. Since then, emboldened by his success, his stance has blended well with his wider assault on vested interests in business and politics.

But does he not worry now, as he broadens his battle and takes on the likes of Paul Dacre, editor of the Daily Mail, who opposes statutory guarantees, about the consequences for his and his party's media coverage? "Come on!" he shouts back. "You have got to do the right thing! What do people think about politicians? They think they are short-termist, opportunistic, unprincipled. For me to back away would have been absolutely miserable and pathetic. You have got to do the right thing. That is my position."

It is true that Miliband has been consistent. He backed something very similar to Leveson's plans in his evidence to the judge's inquiry. "I think that Leveson has come up with an ingenious and good solution," he says. "It is similar to the Irish model. You have self-regulation, but you have somebody who is a guarantor that it is adequate self-regulation based on principles of independence. Essentially [Leveson's plan] is the Irish system with more political distance, which I think is right."

Were the Leveson plans not to be backed by statute, he fears a slide back to the unsatisfactory status quo. "The danger is that we would end up back where we were before with a press complaints body which is insufficiently independent and which does not give people proper redress."

The press, he says, does to some extent realise its failings and he says he respects the likes of Dacre for trying to do something about them. He just doubts that those in charge of newspapers can ever make a new system work alone.

"There is the desire for control in the newspapers and then there is this understanding of the need for independence. But the problem is who guarantees the independence? You can't have the people who want control, ie the newspapers, being the people who guarantee the independence. I actually think Leveson's solution is a smart solution."

Miliband is fairly savage about Cameron's performance over Leveson, saying he was forced into setting up the inquiry because of his closeness to the press and now rejects its core conclusions for the very same reason. The prime minister, in his view, has betrayed the victims of phone hacking. "He promised the victims' voices [such as the parents of Milly Dowler and Madeleine McCann] would be paramount but now he has betrayed that promise by rejecting the report before the ink was dry." He cannot, however, be too rude about Cameron at the same time as trying to persuade him on the need for a new law.

So he taunts him for being still in the pocket of his friends, the editors and proprietors. "It is not leadership to do as you are told by a powerful lobby. David Cameron has one last chance to stand up for the victims and show the leadership needed – which he has conspicuously failed to show so far."

Some of Miliband's own supporters in the Labour party and the press believe he has gone too far in appearing to accept all Leveson's ideas – including ones that could hamper journalists trying to do their duty, such as suggestions on data protection. Miliband rejects the charge and says he is only committed to the broad frame, not every detail. "We don't have a closed mind on it," he says.

He firmly rejects Leveson's suggestions that politicians' staff might have to list all routine meetings with journalists as "cumbersome" and "impractical" and says he will be flexible on the proposed role of Ofcom.

Amid all his high-minded talk he too has a clear political plan up his sleeve. He flatters Nick Clegg for being "courageous and right" in also opposing Cameron and praises Tories who have defied their leader. He will give the cross-party talks some time but not more than three weeks. Then he will throw his weight behind attempts to build a cross-party alliance that he hopes will inflict a devastating Commons defeat on the prime minister. He calculates that he has "the vast majority" of the public with him and that Cameron looks shifty and evasive. "He has one more chance to show leadership," he says, quite enjoying the moment.