David Mundell has said he is “saddened” to be replaced as Scottish Secretary and has stressed the importance of delivering a Brexit that preserves Scotland’s place in the union.

The Dumfriesshire MP, who held the position for four years, was replaced by Alister Jack, MP for Dumfries and Galloway, in a Cabinet reshuffle by new Prime Minister, Boris Johnson.

Mr Mundell said: “I was saddened to step down as Secretary of State for Scotland.”

Thanking David Cameron and Theresa May for their support, he added: “I’d also like to wish their successor, Boris Johnson, and mine, Alister Jack, my very best wishes for the future. We have had our differences, but I made clear to Mr Johnson I was prepared to compromise and would work with him, to help deliver Brexit and to resist Nicola Sturgeon’s demands for a divisive second independence referendum. Compromise is, of course, a dirty word in modern politics and the inevitable criticism was forthcoming from the usual suspects.

Mr Mundell added that despite his “disappointment”, he was “not downbeat at all”. He also said he was “confident” his successor and Mr Johnson “will do a good job for Scotland” and urged them to “deliver a Brexit that works” for Scotland and the UK.

He added: “Do that and the Scotland Office’s core mission – to strengthen our place in the union – becomes so much easier. I have previously set out my concerns about the impact of a no-deal Brexit. And during the Conservative leadership contest, I continued to highlight the difficulties it would present, especially for Scotland. A disruptive Brexit threatens businesses and it plays straight into the hands of Nicola Sturgeon.

“I am prepared to take the new Prime Minister at his word when he said the chances of no deal were a million to one against.”

But South Scotland MSP Colin Smyth said: “It is utterly shameless that the Secretary of State for Scotland David Mundell was one of the first to pat Boris Johnson on the back despite previously pretty much saying he wasn’t for to be Prime Minister and that he wouldn’t serve in his Cabinet. By now supporting a Prime Minister who would be happy with a no-deal Brexit, David Mundell has shown that he is more interested in keeping his ministerial chauffer than he is keeping the jobs of his own constituents.”