The man most widely tipped to be Scotland’s next chief constable has retired from policing.

In a move which sent shocks through the ranks, the national force’s No 2, Iain Livingstone has quit after a quarter of a century in uniform.

The Designated Deputy Chief Constable had helped shape Police Scotland in a succession of its most senior roles and was widely seen inside the force as a champion of Scottish policing values.

His departure comes widespread talk that he would be in pole position to replace current chief Constable Phil Gormley, who pipped him to the top job last year.

Phil Gormley, whose own contract runs out at the end of next year but is open to extension, heaped praise on his deputy.

He said: “I would like to pay tribute to Iain for his long career of outstanding public service; his many achievements in policing and the wider criminal justice sector.

“Iain has served the communities of Scotland for over 25 years and has been a central figure in police reform and the creation of the national service.

“As Chief Constable, I have been extremely grateful for his support, advice and leadership over the past year and a half, and I wish him every success in his future plans.”

Mr Livingstone, who is 50, a former Fulbright scholar and a trainer lawyer, has become a mainstay of Scottish justice beyond policing in recent years, serving as a member of Lord Bonomy’s review group on corroboration.

He is not understood to have a new position to go to but leaves Scottish policing with a headache for succession planning, say insiders.

Mr Livingston’s job - as second-in-command at Britain’s second biggest force - is one of the biggest in UK policing.

His salary - last listed in February as between £170,000 and £175,000 - is higher than that of the chief constables of some of England’s biggest forces. He is expected to leave in the autumn.

He will be replaced by the Scottish Police Authority, the force’s civilian oversight body, which is currently without a permament chairman after Andrew Flannigan said he would stand down earlier this summer.

SPA chief executive John Foley said Mr Livingstone had made an “an exceptional contribution”. He added: “We will consider over the coming weeks the necessary leadership and succession arrangements, in consultation with the Chief Constable.”

Mr Livingstone had been popular among the rank and file. Calum Steele, chief executive of the Scottish Police Federation described him as “a remarkable public servant”.

He added: “He is one of the most talented and highly respected police officers of his generation. His retirement represents a tremendous loss for the police service as a whole and for the communities in Scotland in particular.”

In a statement Mr Livingstone said: “It is now the right time for me to retire from policing and take up new challenges. It has been a privilege to serve the people of Scotland as a police officer.”