I worked in the government, which gave me a close-up view of the talks held with Labour about finding a compromise Brexit deal. While many dismissed these negotiations as a grand exercise in futility, destined to fail, I always held out some hope that they might succeed – for the simple reason that those around Jeremy Corbyn wanted to avoid the current dire situation in which the party and, more importantly, the party leader find themselves.

Before I explain further, let me first chuck out the tedious cliché that the original sin was the Prime Minister failing to ‘reach out’ to MPs at the start of the Brexit process. For a party that has prided itself on its ‘constructive ambiguity’ on Brexit, criticising the PM for placing the unity of her party over the need for consensus in parliament is, well, a tad hypocritical. Of course, history has shown that speaking to Labour at the start may well have saved her job, but it’s a brave leader who goes first to the opposition for direction over her own backbenches.

Why, then, my scintilla of hope for success in the talks? First, the Lib Dem/Green/SNP Remainer fightback was already gathering pace when the PM and Corbyn first met. Astute political minds in the Labour leader’s team could see the direction of travel of those idealistic young Corbynites and soft-left pro-European social democrats out of Labour’s arms. But they could also hear the siren calls of the likes of Ian Lavery, Len McCluskey and Lisa Nandy that pivoting to a second referendum would break the party in two.

The government’s negotiating team, and indeed the whole cabinet, could see this too, and the solution they arrived at was to compromise across the board. Dynamic alignment across workers’ rights and environmental protections – even though both meant indefinitely signing up to onerous single market regulations without any say, ostracising a large swathe of Tory MPs. Compromises on a customs union that were hugely painful in the Conservative Party but accepted the reality that no parliament can bind its successor, and any future government with a majority could change our trading relationship. And, at the very last, time set out in legislation for a debate on a second referendum.

Forget the sanctimonious bluff and bluster that greeted the government’s compromise offer. Here was a deal that Labour, which ran in 2017 on honouring the referendum result but needed to pacify its various wings (trade unions, environmentalists, pro-Norway, pro-customs union, Brexiteers and second referendum campaigners), could support… if it wanted to.

And what if it had? What if, instead of making that now fateful PWC speech, the PM had instead introduced the withdrawal agreement bill in the Commons for second reading on Tuesday 21st May, reasonably confident that a majority of Tory and Labour MPs would vote it through?

The first thing is that the twin-track messages of “stop Brexit” from the Lib Dems, Greens, etc and “Brexit now” from Nigel Farage’s outfit – which did so much damage to both major parties – would have been severely dented. Vince Cable and the second referendum cohort would have been asked how they intended to ‘stop Brexit’ without a majority in parliament. More importantly, once the WAB passed and Britain left, would the Lib Dems, Greens and SNP campaign to take Britain back into the EU (a far tougher question and one that might give all their new supporters pause for thought)?

Meanwhile, Farage would have been asked how he could deliver his fabled no deal exit when parliament looked set to deliver a deal. That would have shown up the Brexit Party’s total powerlessness in this process, which was almost completely overlooked in the media’s thirst for a betrayal narrative.

Sunday’s results may have looked similar. The anti-Brexit, pro-second referendum rump in the Labour membership and Labour voters may have screamed and screamed until they were sick. But with the admittedly admirable Corbynite message discipline, media outriders and whipping operation, I think it would be pretty certain the party would have held together.

Meanwhile, the PM would still have had to leave at the WAB’s passing and the already ugly dynastic war currently consuming the Conservatives would still have occurred – but with the backdrop of a disciplined Labour Party able to move off Brexit and onto the social and economic issues it wants to talk about. Instead, Corbyn’s leadership and Labour’s uneasy Brexit coalition look a lot less safe today. And if it does fracture, remember: the deal was there to be done.

Written by an anonymous government official.