Theresa May has urged the two men vying to replace her as prime minister to make strengthening the union one of their top priorities.
In a speech in Stirling on Thursday, Mrs May said her successor should “think creatively” about how to ensure the UK stays together.
She also gave details of a review into how the UK government is structured.
It will look at whether whether government departments are working in the best interests of the union.
The government has stressed it will not include devolved areas that are the responsibility of the Scottish government.
Scotland’s first minister, Nicola Sturgeon, predicted ahead of the prime minister’s speech that the review was “too little, too late” and would do nothing to prevent Scottish independence.
Mrs May’s speech is likely to be her last in Scotland before she steps down as prime minister on 24 July, when she will be succeeded by either Boris Johnson or Jeremy Hunt – who are both due to appear at a hustings event in Scotland on Friday.
Mr Johnson said on Sunday that the next prime minister should be a “minister for the union” while Mr Hunt has pledged to to use “every drop of blood in my veins” to prevent the UK splitting up.
But Ms Sturgeon, who wants another referendum within the next two years, has already predicted that more Scots will be encouraged to support independence regardless of who wins.
In her speech, Mrs May insisted that strengthening the union has been an “explicit priority” of her government over the past three years.
And she said she is confident that this will continue to be the case regardless of who replaces her in 10 Downing Street.
Mrs May added: “The job of prime minister of the United Kingdom of Great Britain and Northern Ireland brings with it privileges and responsibilities which you only really feel once the black door closes behind you.
“One of the first and greatest is the duty you owe to strengthen the union. To govern on behalf of the whole United Kingdom. To respect the identities of every citizen of the UK – English and Scottish, Welsh and Northern Irish.
“And to ensure that we can go on facing the future together, overcoming obstacles together, and achieving more together than we ever could apart – a union of nations and people.”
Mrs May also formally unveil a UK government review of how devolution is working across the UK and what can be done to improve it. The review will be led by Lord Dunlop.
The prime minister said: “We need to work more cleverly, more creatively and more coherently as a UK government fully committed to a modern, 21st century union in the context of a stable and permanent devolution settlement to strengthen the glue that holds our union together.
“There have been several reviews into how devolution works. But we have never thought deeply about how we make the Union work – how we ensure that as we fully respect devolution, we do not forget the UK government’s fundamental duty to be a government for the whole United Kingdom of Great Britain and Northern Ireland.
“Of course it will be for my successor to respond to his recommendations, and I am delighted that both candidates are supportive of the review.”
Ahead of the prime minister’s arrival in Scotland, Ms Sturgeon claimed that the country was “heading inexorably towards independence” and that the Conservatives were “running scared of the rising tide of support for independence”.
She added: “The Tories’ behaviour towards Scotland in the three years since the Brexit vote has been high-handed, arrogant and dismissive.
“They have demolished any notion of a respect agenda and have destroyed their own claims that the union is in any meaningful way a partnership of equals.
“People across Scotland can now see that more plainly than ever. Theresa May’s so-called review of devolution is too little, too late”.