After all, in Mr. Johnson’s rush to leave the European Union — he has vowed a Brexit, deal or no deal, by Oct. 31 — he has been accused of jeopardizing the much older union that he leads: England, Scotland, Northern Ireland and Wales. Even before his trip to Edinburgh, his adversaries warned that he could become the last prime minister of the United Kingdom.

Nowhere have the warnings been more loudly heard than in Scotland, where a majority rejected leaving the European Union in 2016; where a movement for Scottish independence from the United Kingdom goes back decades; and where the first minister, Nicola Sturgeon, has called for a new referendum on leaving the United Kingdom, and is waiting to see whether Brexit brings that objective closer.

Mr. Johnson’s position is so uncertain in Scotland that he cannot even be sure of a meeting of minds with Ruth Davidson, his own Conservative Party’s Scottish leader.

An abrupt rupture with the European Union could also destabilize the peace process in Northern Ireland, and talk of it has even stoked unfamiliar discussion about a united Ireland.

“The union that is the United Kingdom is in mortal danger — more imperiled now than it has ever been in its 312 years of existence,” Gordon Brown, the former Labour prime minister and a Scotsman, wrote in a recent article.