Continued infighting among the Scottish National Party could lead to electoral oblivion, the party's deputy leader has warned.
Ms Cunningham said she wanted to be in government
Roseanna Cunningham was addressing delegates as the SNP conference began in Inverness.
She defended the independence referendum policy at the heart of the leadership debate and told delegates that democratic decisions must be accepted.
Ms Cunningham said: "I want the SNP to form a government in Scotland.
"This party does not exist to be in permanent opposition and I passionately wish that some members would stop giving the impression that that is what they would prefer."
BBC Scotland political correspondent Kirsten Campbell said the warning was "more of a tongue lashing than a speech" but that it was generally well received.
"Essentially what she did today was to tell the party to grow up if it wanted success," she said.
There were some delegates who did not join Ms Cunningham's standing ovation but her message was echoed by John Swinney, who warned that the party must unite or "face being consigned to the fringes" of politics.
The SNP leader said it was time to settle arguments once and for all.
Mr Swinney faces a leadership challenge from Glasgow activist Dr Bill Wilson who has accused him of ducking responsibility for presiding over a "plummeting" SNP vote in two successive elections.
The leadership challenge will be settled at the conference on Saturday.
Mr Swinney said the conference offered Nationalists the opportunity to draw a line under recent difficulties.
He said: "Delegates face a democratic choice and I am confident in their judgement.
"It falls to them to decide whether we drive forward to independence or consign
ourselves to the fringes.
"Above all else, however, once that democratic decision has been taken, this party must unite.
"Our fire must be turned on a Labour Party that is increasingly discredited and on the path to defeat."
Gaining the electorate's confidence and trust is key for future SNP electoral success, he added.
Dr Bill Wilson has claimed the SNP leader is not the person to restore the party's fortunes.
In his leadership manifesto, Dr Wilson said it was not the Nationalists' place "to make devolution work, but to show the Scottish people why
independence is better".
The party called for moves towards compulsory voting in elections and
referenda, with "appropriate penalties" for not voting.
A motion urging party chiefs to "examine the case" for compulsory voting was backed by delegates by 90 votes to 50.