Deputy First Minister John Swinney will not enter the race to become first minister and leader of the SNP, he has announced.

Mr Swinney, who has been in the Scottish Parliament since 1999 and served as leader between 2000 and 2004, said the decision not to run came after he “thought carefully” about if he should stand and had to be sure what he did was “right for my family, the Scottish National Party and our country”.

The 58-year-old joined the SNP in 1979 and held a number of posts with the party at local and national level before becoming Ms Sturgeon’s Deputy First Minister in 2016.

Scotland budgetScotland’s Deputy First Minister John Swinney, who will not be standing to replace Nicola Sturgeon (Jane Barlow/PA)

The politician, who has also represented North Tayside in Westminster, said: “For the best part of the last 40 years, I have had the privilege of being at the very heart of formulating the strategy of the SNP.

“From a very poor starting point in the 1980s, I am proud to have played my part in building the SNP into a successful party of Government in Scotland with an impressive electoral record.”

READ MORE: Why Nicola Sturgeon has chosen now to quit as First Minister

But, he added, after SNP needed to “consider carefully” how to pursue its aims after the route to an independence referendum had been blocked.

“To create the space for that fresh perspective to emerge, I have decided not to be a candidate for leadership in the SNP,” he said.

“At this critical moment, I believe there must be an open debate within the SNP about our direction.

“I encourage those who stand for election to bring forward perspectives that anchor the SNP in the mainstream of Scottish politics which is an absolutely critical requirement for the future success of our cause.

READ MORE: Nicola Sturgeon resigns as First Minister after nine years

“For my part, I will continue to do what I have done since I was 15, and that is to contribute constructively to advance the interests of the SNP, Scotland and the cause of Scottish independence.”