Former first minister Alex Salmond has said he would not have held the vote on independence in 2014 if he had known Boris Johnson would become Prime Minister and the UK would be facing the prospect of a hard Brexit.

Instead he said he would have delayed the vote – claiming this would have resulted in at least three-fifths of Scots backing independence.

He spoke out on the fifth anniversary of the independence referendum, when Scots backed staying in the UK by 55% to 45%.

Within hours of the result being confirmed, Mr Salmond announced he was stepping down as both SNP leader and first minister.

Marking the anniversary of the referendum, he said “in reality” the 2014 vote was needed for Scotland to “experience the fundamental shift of opinion”.

As a result he said the focus should be “on the opportunity still to come” rather than “what might have been”.

In a series of tweets, Mr Salmond said: “If I had but known 5 years ago that @BorisJohnson would become Prime Minister and Britain would be poised on the brink of a hard #Brexit then I would have delayed the Scottish referendum and now looked forward to a 60% plus Yes vote.

“In reality, it is probably the case that #Scotland had to experience the fundamental shift of opinion in our first referendum before acting decisively to seize the day next time around.

“Therefore on this fifth anniversary we should focus not on what might have been but on the opportunity still to come.”

Pamela Nash, of the pro-UK campaign group Scotland in Union, said: “Alex Salmond’s comments show there is no positive case for independence.

“He wants to rely on chaos and division in society.

“His plan to break up the world’s most successful union was rejected five years ago and is today opposed by even more Scots.

“He misled voters in 2014 with bogus claims, such as a threat to our NHS and neglected public services, while focusing on dividing our communities, so a period of silence from him would be welcome.”