The problem with legacies and the obsession of departing leaders to bequeath them is that the wrong sort can breenge in and wreck the place. Tony Blair modernised the Labour party, repealed section 28 and drove investment in our moribund cities, but his tenure will always be disfigured by the Iraq war. Theresa May has spent the past month traversing the UK seeking to carve her name into any cause that will have it: mental health provision here; zero-carbon emissions there. Rather inadvertently though, she is also making a late run to be remembered as the handmaiden of Scottish independence.

Nicola Sturgeon, Scotland’s first minister, has her own thoughts on this. “Scotland is heading inexorably towards independence – that will be Theresa May’s legacy,” said Sturgeon ahead of the prime minister’s visit to Scotland on Thursday. This legacy may even stretch to an essay in a future modern studies exam paper: “Theresa May was responsible for delivering Scottish independence. Discuss”.

In this she has been helped by the two remaining candidates to succeed her in the Conservative leadership election. Boris Johnson and Jeremy Hunt have been conducting themselves like a pair of posh delinquents living out a Ferris Bueller fantasy, spending money they don’t have on projects that will never happen and not a responsible adult in sight for another three weeks. Each has pledged to defend the union until their dying breath but in the manner of the master of Downton Abbey undertaking to hang on to the servants if the balloon goes up. During the early leadership skirmishes the original cast of candidates discussed Scotland in ascending degrees of condescension.

'Everything’s out of control': Stirling citizens on the Tory succession Read more

An expanse of clear blue water has opened up between yes and no in a string of recent opinion polls about Scottish independence. The combination of Boris Johnson in No 10 and a no-deal Brexit is causing committed no voters at the 2014 referendum to reconsider. For some, Scottish independence has come to represent the last helicopter out of Saigon. Gordon Brown played a crucial part in staving off independence in 2014. Now he believes the union is “more imperilled than it has ever been”.

The prime minister is awake to the terror of being hailed as the reluctant hero of the Scottish independence movement. Yet framing her visit in the context of a “review” of Scottish devolution in a week that marked the 20th anniversary of the Scottish parliament was another serious error of perception. What did she mean by a “review”? After conducting it will she then hand it back to Nicola Sturgeon like a school report card: attendance excellent but could do better in maths and history?

May’s speech on Thursday was a grotesque confection of comedy treats. “As we look to the future, and the questions it will ask of us, we can take confidence that our union is built on rock-solid foundations.” And this: “Successive Conservative and Conservative-led governments since 2010 have strengthened the devolution settlements.”

For many Scottish moderates the attitude and conduct of May and her government towards Scotland was sickening

All the evidence points in the other direction. After every one of Scotland’s 32 council areas voted decisively to remain in the EU, May indicated a collaborative approach to the Brexit negotiations. Yet, when article 50 was triggered in 2017 there had been no meaningful consultation with the Scottish government. Monthly meetings of the Joint (Westminster and Holyrood) Ministerial Council were cancelled so often that Scottish ministers ran sweepstakes on the time of the cancellation text message. Then they found that some of the powers returning from Brussels in devolved areas would be staying in Westminster … for the time being.

For many Scottish moderates the attitude and conduct of May and her government towards Scotland was sickening. This was never more so than when the prime minister scorned Holyrood’s considered compromise proposals on keeping Scotland’s place in the single market and customs union. The perverse irony of this is that such a plan might have gained sufficient support at Westminster to save Brexit and save May’s job.

When she chose instead to pander to the Tory hard-right and the DUP amid bribes and trade-offs it became clear that the risk of alienating moderate Scots and driving them towards nationalism was one worth taking. Late in the day she has turned to face the consequences of her actions. A poll conducted among Conservative members last month indicated a desire for Brexit so overwhelming that they would sacrifice the “precious” union for it. Sooner rather than later they may have their wishes fulfilled.

• Kevin McKenna is an Observer columnist