Imagine a media organisation where senior employees at its biggest-selling Sunday paper were convicted of criminal acts including phone-hacking and perverting the course of justice. Then imagine that the same organisation, having claimed a few years later to have cleaned up its act, is revealed to have its most high-profile TV station rife with claims of sexual harassment by its former chief executive and onscreen star, as well as allegations of widespread racial harassment – both the subject of legal action and US federal investigation.

Imagine also that the TV station was a byword for bias and slanted coverage and that as recently as May this year it falsely besmirched the name of a murdered Democratic staff member by claiming he, not the Russian government, had leaked thousands of emails from the Democratic party during the presidential campaign. Imagine that it had then withdrawn the story, but three months on taken no action against those responsible nor apologised to the dead man’s parents, who had publicly explained how the claims their son was a traitor had added to their grief. Imagine also that the media organisation was unique among commercial organisations in its combined power over newspapers, radio and TV in the UK.

In any fair and just world, the notion that this media organisation was fit and proper to be given greater power over the media landscape in the UK would be dead in the water. But, no doubt in part because the relevant media organisation is 21st Century Fox, run by the Murdochs, the idea that it should get 100% control of Sky is not yet dead.

But the Murdochs are facing more of a battle than they expected. With every passing month, the evidence against this bid has grown stronger. That, and not the laughable claim of “commercial reasons”, explains their decision this week to suddenly shut down the UK broadcasting of Fox News. Quite simply, the fear of the Murdochs is that the scandals at Fox News could in 2017 sink their bid for Sky, just as the scandals at the News of the World did in 2011.

They deserve to do so, and in the next couple of weeks crucial decisions will be taken by the culture secretary, Karen Bradley, and the regulator Ofcom. To her credit, and partly because of pressure from campaigners such as Avaaz, she has indicated she will refer the Murdoch bid to the Competition and Markets Authority for a six-month inquiry on grounds of plurality – the scale of the Murdochs’ control over the media landscape. But she needs also to refer the bid on grounds of the potential threat to broadcasting standards.Some people will argue that we couldn’t end up with Fox News here because of our codes on broadcasting, including our impartiality rules. But that is far too complacent. First, because the codes are limited, as Ofcom acknowledges – impartiality rules cannot take account of story selection, tone or prominence. Second, because a broadcaster deciding to push the code to the limits has the power to push around a weak regulator – and the Murdochs have a long history of being willing to do precisely that and, indeed, to breach undertakings they have made – from the Times in the 1980s to the Wall Street Journal more recently. Third, we don’t need to imagine the impact of full rather than partial control of Sky by the Murdochs – this change in ownership just happened in Australia and reports suggest the move to a more rightwing, opinionated Sky News has quickly followed.

Fox News has played a major role in polluting the well of public conversation in the US, stirring division and hatred. We know also that Rupert Murdoch has mused about making Sky more like Fox. We should not risk the Foxification of Sky News. What the law requires is a broadcaster committed to acceptable broadcasting standards. If there is a risk that the broadcaster lacks that commitment, then standards are constantly in peril. And in this case, that would be enough to block the bid. The case for referral is overwhelming, based on the record of Fox News as well as the total failure of corporate governance in the Murdoch empire revealed by what happened at the News of the World and at Fox. The secretary of state must have a proper inquiry into these dangers. If she does not and we end up with Sky becoming more like Fox, it will be her responsibility.

The onus is not just on Bradley. Soon Ofcom is due to reply to a legal threat by Avaaz, and a detailed submission from Ken Clarke, Vince Cable, Lord Falconer and me, both of which challenge its finding that the Murdochs’ record suggests they are fit and proper to take full control of Sky. It is not simply common sense that says Ofcom got it wrong: its judgment was riddled with errors, including the claim that almost all the racial and sexual harassment at Fox News took place before 2012, and therefore did not impugn the new governance arrangements put in place at 21st Century Fox after the News of the World scandal. Ofcom failed to follow up its own report slamming the conduct of James Murdoch and to properly consider his pivotal role as CEO of 21st Century Fox if the bid succeeds. And it erred in the threshold it applied to its fit and proper decision. This decision, and the way it is handled, is Ofcom’s biggest test. The right thing to do is to admit its errors and re-open the fit and proper investigation. If it does not, it will likely, and rightly, face legal challenge.

Six years ago, when the hacking of Milly Dowler’s phone was revealed, politicians of all parties gravely proclaimed that never again would we kowtow to the Murdochs. There are many issues our country faces. But one of them is whether public authorities have the courage to stand up to the powerful. That is essentially the question facing the regulator and the government about this bid. They owe it to the public interest to honour promises made six years ago in deed as well as word.

• Ed Miliband is former leader of the Labour party, and MP for Doncaster North