As I interviewed Ed Miliband on his 2015 election battle bus, his exasperated aides frantically tried to persuade the BBC not to go big for a fourth day running on the prospect of a minority Labour government being propped up by the Scottish National Party.

“How damaging is it?” the then Labour leader asked me. “Bad,” I replied. He wasn’t convinced. But the Tories’ repeated warnings of a “coalition of chaos” if Miliband became prime minister in a hung parliament undoubtedly damaged Labour’s prospects.

He even adopted SNP language by describing Westminster as the “English parliament”. His remarks at the Edinburgh Festival Fringe contradict Dick Leonard, the Scottish Labour leader, and the party’s 2017 election manifesto. They came a day after Nicola Sturgeon, the SNP first minister, raised the prospect of a “progressive alliance” with Labour to keep the Tories out.

Boris Johnson's cabinet: Who's in and who's out Show all 40 1 /40 Boris Johnson's cabinet: Who's in and who's out Boris Johnson's cabinet: Who's in and who's out In: Jacob Rees-Mogg Jacob Rees Mogg appointed Leader of the Commons AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Esther McVey Esther McVey appointed housing secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Jo Johnson Jo Johnson appointed new business and energy secretary EPA Boris Johnson's cabinet: Who's in and who's out In: Brandon Lewis Brandon Lewis appointed immigration secretary Getty Boris Johnson's cabinet: Who's in and who's out In: James Cleverly James Cleverly appointed Conservative Party chairman PA Boris Johnson's cabinet: Who's in and who's out In: Baroness Evans Baroness Evans remains Leader of Lords PA Boris Johnson's cabinet: Who's in and who's out In: Julian Smith Julian Smith appointed Northern Irish secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Alister Jack Alister jack appointed Scottish secretary PA Boris Johnson's cabinet: Who's in and who's out In: Alun Cairns Alun Cairns remains Welsh secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Grant Shapps Grant Shapps appointed transport secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Alok Sharma Alok Sharma appointed international development secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Robert Buckland Robert Buckland appointed justice secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Amber Rudd Amber Rudd remains work and pensions secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Robert Jenrick Robert Jenrick appointed housing and communities secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Andrea Leadsom Andrea Leadsom appointed business secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Nicky Morgan Nicky Morgan appointed culture secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Gavin Williamson Gavin Williamson appointed education secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Theresa Villiers Theresa Villiers appointed environment secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Liz Truss Liz Truss is appointed international trade secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Ben Wallace Ben Wallace appointed defence secretary EPA Boris Johnson's cabinet: Who's in and who's out In: Stephen Barclay Stephen Barclay remains EU secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Dominic Raab Dominic Raab appointed foreign secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Priti Patel Priti Patel appointed home secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Michael Gove Michael Gove given Chandellor of the Duchy of Lancaster AFP Boris Johnson's cabinet: Who's in and who's out In: Sajid Javid Sajid Javid is appointed Chancellor of the Exchequer AP Boris Johnson's cabinet: Who's in and who's out Out: Jeremy Hunt Jeremy Hunt sacked as foreign secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Matt Hancock Matt Hancock remains health secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out Out: Chris Grayling Chris Grayling resigned as transport secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: Jeremy Wright Jeremy Wright sacked as culture secretary PA Boris Johnson's cabinet: Who's in and who's out Out: Karen Bradley Karen Bradley sacked as Northern Ireland secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: James Brokenshire James Brokenshire sacked as housing and communities secretary Reuters Boris Johnson's cabinet: Who's in and who's out Out: Penny Mordaunt Penny Mourdaunt sacked as defence secretary Reuters Boris Johnson's cabinet: Who's in and who's out Out: Liam Fox Liam Fox sacked as international trade secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: Greg Clarke Greg Clarke sacked as business secretary PA Boris Johnson's cabinet: Who's in and who's out Out: David Mundell David Mundell sacked as Scottish secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: Damien Hinds Damien Hinds sacked as education secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: David Gauke David Gauke resigned as justice secretary EPA Boris Johnson's cabinet: Who's in and who's out Out: Rory Stewart Rory Stewart resigned as international development secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: David Lidlington David Lidlington resigned as deputy Prime Minister PA Boris Johnson's cabinet: Who's in and who's out Out: Philip Hammond Philip Hammond resigned as Chancellor of the Exchequer AFP/Getty

What’s going on? As in 2015, Labour can’t admit it, but knows it will be difficult to win an overall majority. Although he didn’t need to say it in public, perhaps McDonnell was preparing the ground for a post-election Lab-SNP deal – not a coalition, but a pact in which the SNP supported Labour in key votes in return for an independence referendum. If Brexit had not happened by then, their common agenda could include a Final Say referendum.

Inevitably, the Tories are reprising their 2015 attack, with their chairman James Cleverly warning: “This Sturgeon-Corbyn alliance would be a nightmare prospect for Britain.”

In 2015, the Tories hoovered up seats in the southwest held by their Liberal Democrat coalition “partners” in a below the radar campaign, claiming a Lab-SNP pact would see government money switched from the region to Scotland. No doubt Team Boris will soon warn that the billions he would spend on transport projects in the north of England would be diverted to Scotland. It could boost his campaign to target 2016 Leave-voting seats held by Labour.

Yet the Tories should not assume they have a magic bullet. A lot has changed since 2015. Warning about a “coalition of chaos” would look pretty rich to some voters after the chaos of Tory rule since 2016, including a “regressive alliance” with the Democratic Unionist Party and a £1bn bung for Northern Ireland to seal the deal.

Brexit has dramatically changed the dynamics of the Scottish question. A poll taken after Johnson’s visit to Scotland last week found that 52 per cent of Scots would vote for independence, with 48 per cent against.

Some 56 per cent of 2016 Remainers want a referendum in the next two years and 59 per cent would support independence. Scotland voted to Remain in 2016, so it is hardly surprising that Johnson’s 100mph drive towards the no-deal cliff edge has fuelled support for independence. It’s not great news for the Scottish Tories, whose gains in 2017 allowed May to remain in power. Ruth Davidson, the Scottish Tory leader, has warned Johnson against no deal and sent Downing Street the Scottish media coverage of this week’s poll. Of course, opinion could switch back if the UK leaves the EU. Would Scotland risk losing its single market with the rest of the UK for one with the EU? The messy Brexit process might not be a good advert for divorce.

Independent Minds Events: get involved in the news agenda

But the apparent rise in support for independence is another reminder of the forces unleashed by Brexit, particularly a no-deal one. The impact in Scotland would be bad enough. In Northern Ireland, it would potentially be even more dangerous. Boris Johnson styling himself “minister for the Union” might not be enough to stop a drift towards a united Ireland. Under the Good Friday Agreement, the Northern Ireland secretary must call a border poll if there is likely to be public support for the province to leave the UK. Karen Bradley, the previous holder of the post, warned May’s cabinet that a no-deal exit would make such a poll far more likely.

So Johnson is playing with fire. His own party might not care. Remarkably, a YouGov survey found that six out of 10 Tory members would rather Brexit happened even if it meant Scotland or Northern Ireland leaving the UK. So much for the Conservative and Unionist Party. It’s the Brexit Party now.

In 2015, the Lab-SNP spectre helped David Cameron win an unexpected overall majority, the high point of a career cut short by his unnecessary EU referendum. After winning the 2014 vote on Scottish independence, Cameron wanted to be remembered as the PM who kept Scotland in the UK and Britain in Europe. Will his legacy now be as the man who spectacularly did the opposite on both?