The chief constable of Police Scotland is to stand down from his post at the start of December, he has confirmed.
Sir Stephen House, 57, said the time was right to take up new challenges after 35 years as a police officer.
He has been under severe pressure over the three days it took his officers to respond to a fatal crash on the M9.
Sir Stephen had previously indicated he was likely to stand down when his four-year contract expired in September of next year.
Confirming the details of his departure at a meeting of the Scottish Police Authority (SPA) in Stirling, he outlined some of the successes of Police Scotland, including the new national approach to domestic abuse and sexual attack.
'Recruit my successor'
He added: "As the leader of a national organisation that provides a vital public service 24 hours every day of the year, there can never be a convenient time to move on, but after nearly 35 years as a police officer and the last nine as a chief constable in Scotland, I believe the time is right for me to take up a new challenge and thereby allow the process to recruit my successor to begin.
"Much has been achieved since the creation of Police Scotland and I firmly believe that Scotland is better served for it. Not only in managing the changes brought about by reform and substantial financial cuts, but most importantly in the public service we provide."
He acknowledged: "There remains a lot to do, but knowing as I do the quality of our officers and staff, I am confident that the challenges will be met.
"The dedication and commitment of our people is truly outstanding and I know will serve Scotland well in the future under a new chief constable."
Paying tribute to the chief constable, SPA chairman Vic Emery said he firmly believed that Sir Stephen had been "the right individual at the right time" to lead Police Scotland through the "combined challenges of major reorganisation, fundamental reform, and reduced funding".
He added: "Sometimes the public don't always see the real person behind the public profile. Steve has always been a constable first, and a chief officer second."
Sir Stephen, who was previously the chief constable of Strathclyde Police, oversaw the complex amalgamation in 2013 of Scotland's eight regional police forces into the single national force, which is the second largest in the UK.
Since then, he has overseen successes such as the policing of last year's Commonwealth Games in Glasgow.
But he was criticised over his decision to allow armed officers to attend routine incidents, as well as the force's policy on stopping and searching juveniles.
The force is also under pressure over its response to the M9 crash in July in which John Yuill and his partner Lamara Bell died after it took three days for officers to respond to reports of their car leaving the road near Stirling.
Profile: Sir Stephen House
When Sir Stephen House was appointed the first chief constable of the new Police Service of Scotland he was credited with being the best candidate because of his "impressive track record of leadership, partnership working and delivery".
Those were the words of the then Justice Secretary Kenny MacAskill, who believed Sir Stephen would make "an outstanding" chief constable.
Before the 57-year-old took on the role in October 2012 - seven months before Police Scotland came into being - he already had an impressive CV of public service both north and south of the border.
Sir Stephen's police career began 34 years ago when he joined Sussex Police.
He was a uniform officer between 1981 and 1988, initially working for Sussex and then later transferring to Northamptonshire Police followed by West Yorkshire Police.
Sir Stephen's first taste of high command came in 1998 when he joined Staffordshire Police as an assistant chief constable, initially in territorial policing and later in crime and operations.
After three years in that job he joined the Metropolitan Police Service as a deputy assistant commissioner.
Despite what he described as his "estuary English" accent, Sir Stephen is Scottish, having been born in Glasgow.
Police Scotland officers are being investigated by the Police Investigations and Review Commissioner over the death of Sheku Bayoh, who died in police custody after being arrested following an incident in Kirkcaldy on 3 May.
And there have also been reports that Police Scotland was one of two unnamed UK forces accused by a watchdog of spying on journalists and their sources.
Sir Stephen had faced calls to resign from opposition politicians in the wake of the controversies, but Scotland's first minister, Nicola Sturgeon, has always insisted she had full confidence in him.
Responding to his announcement, Ms Sturgeon thanked Sir Stephen for his "years of dedicated service" with both Strathclyde Police and Police Scotland.
She said: "Strong policing has ensured recorded crime is at a 40-year low. Sir Stephen provided leadership at a crucial time and his strong focus on tackling violent crime made a major contribution to that achievement.
"Reform of policing in Scotland was absolutely vital to sustain the policing upon which Scotland's communities depend and Sir Stephen's contribution to that was invaluable."
Scottish Liberal Democrat leader Willie Rennie, who has been a fierce critic of the single force, said Sir Stephen's departure would not by itself solve the "deep-rooted problems" in Police Scotland and that the force needed a "fresh start".
He added: "Ultimately the SNP government must accept responsibility for this chaos. They rammed through the centralisation of our police service despite warnings. They set up the toothless Scottish Police Authority. They appointed the chief constable."
Scottish Conservative leader Ruth Davidson said Sir Stephen was "bowing to the inevitable" by resigning, and said it was "essential that his replacement is up to the task of tackling the problems that have afflicted the single force since its inception".
Scottish Labour's justice spokesman, Graeme Pearson - who was formerly a senior police officer - said the process of reforming Police Scotland "can begin now if the SNP government are willing to take responsibility for their mistakes".
But the Scottish Police Federation, which represents rank and file officers, said Sir Stephen had made a "monumental contribution" to policing.
The federation's chairman, Brian Docherty, said: "He has delivered the most significant public sector restructuring in a generation against a background of a brutal austerity agenda.
"He has delivered some very impressive policing results on crimes of violence, particularly domestic violence. I have little doubt that history will prove to be kinder to Sir Stephen than the current commentary which at times has been vindictive and deeply personal.
"Many people feared that a single police service could be susceptible to political interference and those who have called for the head of the chief constable as some form of trophy need to consider that."
Niven Rennie, president of the Association of Scottish Police Superintendents, said on Twitter that the first chief constable of Police Scotland "was always going to be on a hiding to nothing".
He also said that critics of the force should "recognise the great achievements of Police Scotland in its formative years not concentrate on the mistakes."
Mr Rennie said Sir Stephen's decision would give the force a chance to rebuild on a "crazy" two years, and that he believed a "change in style will help".
Martin Bell, the brother of M9 crash victim Lamara Bell, said: "It's over to the government now to see what changes they will bring in.
"We have no faith in Police Scotland at all and no faith that we will see real change as a result of Sir Stephen standing down.
"What happened to Lamara really can't happen again. They need to stop making cuts to emergency services and put as much funding into them as they possibly can."