This was not how Steven Spielberg or Richard Curtis would have scripted it. A feelgood movie about a veteran editor at the end of his career would have had the hero stepping down at the climax of his last and greatest campaign. The gnarled but lovable chief would write his final triumphalist headline before parading out of the office to a schmaltzy mix of applause and tears.

And maybe that is how Paul Dacre imagined the end of his 26-year tenure of the Daily Mail. He would stay in the job just long enough to drive a final stake through the heart of Britain’s relationship with Europe. It would be the crowning moment of glory to round off a long and remarkable newspaper career.

But for that script to work Dacre had to stay in post until at least November. He would steer the newspaper through the treacherous shifting sands of Brexit this autumn and be there to stiffen the spine of a weak prime minister who, on one view, owes her survival to Dacre’s patronage. Only then could he be certain that his life’s work was done.

The choreography all pointed to that scenario. Theresa May attended a banquet in the City last November to celebrate Dacre’s quarter of a century at the Mail helm. And then, in June, came the announcement that Dacre would move upstairs to become chairman and editor-in-chief of Associated Newspapers. In November.

But that script now appears to have been ripped up. Instead – and much more interestingly – Dacre will be now replaced by his colleague Geordie Greig at the beginning of September. Only two months in it – except that Greig’s instincts on Brexit are a million miles from Dacre’s and those two months will be nail-bitingly uncertain ones for any compulsive Brexiter. Who knows what turmoil, internecine warfare and backsliding could yet happen without Dacre to enforce discipline?

Facebook Twitter Pinterest Paul Dacre has exercised huge influence on British politics. Photograph: Stefan Rousseau/PA

Respect him or detest him – and both camps are well-subscribed – there’s no denying that Dacre has exercised an enormous influence on British politics and public life in his years as editor. His admirers put him in the same league as such celebrated and instinctive tabloid editors as Hugh Cudlipp of the Mirror or Arthur Christiansen of the Express. His detractors say he exerts power, both internally and externally, through intrusion, bullying and fear.

There’s a further camp of those who admired early Dacre but have watched with some dismay as the Mail – especially over Europe – has become more and more shrill and obsessional. Anyone who dares to disagree with what the Mail decrees should happen over Europe – judges, elected politicians, peers, European civil servants, other journalists, the loathed metropolitan elite – is held up to ridicule or snarling contempt. Judges are branded enemies of the people. Rebel Tory MPs – the dirty dozen – are denounced as treacherous betrayers and swivel-eyed Remoaners. Business leaders are castigated for scaremongering and appeasement. The monstrous, sclerotic, statist EU is a foreign land run by deranged bureaucrats.

Poisonous hatchet jobs are ordered up on politicians who – except on this one issue – the Mail would normally respect. In the wake of Jo Cox’s murder, some of the most violent coverage caused victims extreme anxiety about the possible consequences.

The contrast with the editorial line and calmly reasonable tone of the sister Sunday paper edited by Greig could hardly be greater. Greig opened up his pages to a variety of views (even such Mail-hated figures as Nick Clegg, Nicky Morgan and David Miliband). His own editorials, which argued strongly for the Remain side in the 2016 referendum, have been coolly scathing of many of the tactics and arguments deployed by the pro-Brexit campaigners. It was not only Private Eye that began to read his leaders as a not very coded rebuke to the Daily Mail.

Is the editor of the Daily Mail the most dangerous man in Britain? Read more

The Sunday paper’s arguments continue to be the mirror image of the daily’s. To Dacre, the recent warnings from companies such as Airbus are “highly implausible”. To Greig, they “need to be listened to with respect, not treat[ed] with contempt”.

“Sometimes,” ran a recent MoS editorial, “it seems as if the more fervent Brexiteers are in the grip of a form of idealism so overheated that they forget the ordinary and vital details of life and politics.” As if to emphasise a completely different idea of what centre right politics should look like, it added: “This is not what Conservatives are supposed to do. Conservatism is about preserving what is known to work, while reforming things which do not work. It is also about tolerant respect for opponents, a willingness to accept that they too are motivated by good intentions.”

Everything, in other words, that late Dacre isn’t.

In Greig’s view, a deal that preserved the economic benefits of the EU, especially those provided by the single market and the customs union, “is not in any way a betrayal of the Brexit majority”. Compromise is in the air.

In short, in barely three weeks’ time the Mail will be in very different hands. As if anticipating Greig’s mind, Dacre took to the pages of the Spectator in June to warn his successor: “Support for Brexit is in the DNA of both the Daily Mail and, more pertinently, its readers. Any move to reverse this would be editorial and commercial suicide.”

But Dacre is moving on and can no longer assume what the Express proprietor, Lord Beaverbrook, used to describe as “the voice of God”. Cudlipp, in retiring at 60, reflected: “Old men are tiresome in journalism… I did not want to be… jealously and cantankerously bullying instead of gently persuading younger performers with new approaches.”

The 57-year-old Greig – who is taking a number of like-minded lieutenants with him – will need formidable dexterity to turn around the tanker of thunderous Mail opinion in the space of weeks without confusing or alienating his readers. But it is not hard to imagine him adopting a Keynesian pragmatism, with his new newspaper telling readers: “When facts change I change my mind.”

If so, the rotating of the editorial guard at the Mail could prove to be a hugely significant moment in British political life. It could, in fact, be just as Richard Curtis would have scripted it. Unless other rumours are true – that Dacre intends a third act editing the Telegraph – which would be a final twist worthy of Spielberg. This particular show ain’t over ’til it’s over.

• Alan Rusbridger was editor-in-chief of the Guardian and is now principal of Lady Margaret Hall, Oxford. His book, Breaking News, is published by Canongate