Former first minister Jack McConnell has announced his immediate resignation as Scottish Labour leader.
The 47-year-old, who will stay on as MSP for Motherwell and Wishaw, is to become the next British High Commissioner to Malawi.
Mr McConnell had been under pressure to go since the Scottish National Party won the Holyrood elections in May.
He said his party needed to re-engage with the people and develop new policies to rebuild support.
Former enterprise minister Wendy Alexander has been tipped as the frontrunner to succeed Mr McConnell, but it is not clear if there will be a leadership contest.
Deputy leader Cathy Jamieson will take the party reins in the meantime.
Mr McConnell will also undertake an education project to help children in Malawi and Rwanda on behalf of the Clinton Hunter Development Initiative - the organisation set up by former US president Bill Clinton and Scots philanthropist Sir Tom Hunter.
He will continue as an MSP while the current high commissioner, Richard Wildash, completes his posting, scheduled to end in 2009.
Announcing his departure as leader at a press conference Mr McConnell, who succeeded Henry McLeish as first minister and Scottish Labour leader in 2001, said he took over at a challenging time, when some were wondering whether devolution could survive.
He told reporters: "Scotland is a far better place now than it was six years ago.
"We are more prosperous and more confident as a nation.
"I believe that we have made this progress because we took bold action and addressed many of the real issues that had held Scotland back."
Despite Labour's disappointing election performance, Mr McConnell expressed a hope that the party could still achieve some of its planned education reforms.
He said: "The Scottish Labour Party needs to respond to the election defeat in May and hear what the Scottish people had to tell us.
"We need to re-engage with our people to develop the policies and the approach which will rebuild our support, because those with the least need us to be successful."
Mr McConnell, who as first minister forged close connections between Scotland and Malawi, will take on his role at the Clinton Hunter Development Initiative on a voluntary basis.
"I am very excited to bring together my other two life-long passions; education to release human potential and ending poverty in Africa," he said.
"In fact I can't wait to get started. It is time for the rest of my life to begin."
First Minister Alex Salmond said Mr McConnell had left Scotland in a better state than he found it, adding: "Addressing Scotland's poor public health record and expanding Scotland's horizons abroad will be regarded as substantial achievements."
Scottish Tory leader Annabel Goldie said: "We never doubted his wholehearted commitment to devolution, to the Scottish Parliament and to Scotland."
Nicol Stephen, the Scots Lib Dem leader who worked alongside Mr McConnell as deputy first minister, said leading a coalition government was a tough challenge.
"Jack McConnell was prepared to put aside narrow party dogma to seek and build consensus on a positive way forward for Scotland," said Mr Stephen.
His departure has left Scottish Labour with the task of finding a fourth leader since 1999.
The party will meet later this week to decide what happens now.
Any candidate must secure the backing of six other MSPs in order to stand, according to the rules.