The leader of the Scottish National Party John Swinney has resigned.
John Swinney pauses during his resignation news conference
He made a formal announcement on Tuesday morning following poor results in the European elections in which the party failed to overtake Labour.
The 40-year-old MSP for Tayside North was elected party leader in September 2000 but latterly faced criticism for accepting the concept of devolution.
His deputy, Roseanna Cunningham, has announced her intention to stand for the leadership.
Mr Swinney believed independence would be achieved by increasing the power and influence of his party, using the Scottish Parliament as a platform.
However, he faced opposition from fundamentalists who said the SNP should focus on the objective of total independence.
First Minister Jack McConnell said: "In the end, John Swinney had no choice but to resign having increasingly lost the debate to Labour over the last three years.
"But a change at the top won't make much of a difference. The real problem with the Nationalists is not their leadership but their politics and their policies."
In his resignation speech, Mr Swinney defended the SNP's credibility and record but accepted responsibility for the failure to sell the party's message.
Speaking at the party's headquarters in Edinburgh he said: "Many voters are telling us we have not yet answered their key question, why independence?
"We are not yet seen as an alternative government in waiting, and despite my best efforts over the past four years I accept that many people still do not have a clear understanding of what the SNP stands for, over and above an independent Scotland.
"As leader of the Scottish National Party, I take full responsibility for the fact that we have not made as much progress in these areas as I would have liked."
He issued a plea for unity in order to secure a future for the party.
"Given the scale of the challenges we face, what our members need and what I appeal for today, is unity within the Scottish National Party to ensure our success.
The European elections caused a storm for John Swinney
"No member of the SNP should ever underestimate the damage that is caused to our movement by the loose and dangerous talk of the few."
Mr Swinney pledged his support and co-operation to his successor and said he would continue to serve as an MSP.
He said: "I confirm my intention to continue to represent the people of North Tayside in the Scottish Parliament for as long as they will give me the honour of so doing.
"It has been a privilege to lead the Scottish National Party during this time of the rebirth of Scottish democracy.
"I am proud to have played my part in the sometimes difficult transition the SNP is making from being a party of protest to becoming a party of government. It is a journey I am certain we will complete."
Mr Swinney had vowed to overtake Labour in the European elections but failed to do so, increasing pressure on his position.
Following the poll, he said the party had been "bedevilled" by internal strife and had not succeeded in explaining to the public the SNP's policies beyond independence.
He had expressed his determination to continue but changed his mind after some senior figures stated publicly that his position was untenable.
Names touted as a possible replacement include Ms Cunningham, justice spokeswoman Nicola Sturgeon, Kenny MacAskill and former MSP Mike Russell.
Nominations open Tuesday
Nominations close 16 July
Ballots mailed to all members by 13 August
Ballots to be returned by 31 August
Result announced 3 September
Ms Sturgeon said she was "taking soundings" and Mr Russell said the party now had some "serious thinking" to do before it moved forward.
There was a lot to thank John Swinney for, including the "long overdue" internal reforms which he had introduced.
Alex Salmond, who led the party until 2000, appeared to rule himself out of the contest by saying he would decline if nominated.
Mr Salmond blamed elements of the SNP and the Scottish press for not recognising John Swinney's achievements as SNP leader.
Alex Neil, who was beaten by Mr Swinney four years ago, said he would think about standing again.
Campbell Martin, the MSP who was suspended from the SNP after criticising the leader, said Mr Swinney had made the right decision.
It was now time for the SNP to take a different direction and return to its core message of independence, he added.
Nominations for the new leader have opened and the result will be declared on Friday 3 September.