Media playback is unsupported on your device Media caption Alistair Carmichael: "I could and should have stopped it"

Nicola Sturgeon has called on former Scottish Secretary Alistair Carmichael to consider his position as an MP after he admitted being behind the leak of a memo ahead of the general election.

The leak suggested the Scottish first minister wanted David Cameron to remain as prime minister.

Mr Carmichael said it was an error of judgement and he accepted "the details of the account are not correct".

Ms Sturgeon said it had been a "blatant election dirty trick".

The confidential memo was published by the Daily Telegraph on 3 April as the general election campaign got under way.

It was written by a civil servant in the Scotland Office and claimed Ms Sturgeon told the French Ambassador to the UK, Sylvie Bermann, that she would prefer Mr Cameron, the leader of the Conservatives, to remain as prime minister.

Media playback is unsupported on your device Media caption Nicola Sturgeon: "If voters had known about the memo they might have voted differently"

The memo also claimed Ms Sturgeon said that Ed Miliband, who was then Labour's leader, was not prime minister material.

The official cabinet office inquiry into the leaking of the memo said Mr Carmichael's former special adviser Euan Roddin gave the details to the Daily Telegraph - but he had Mr Carmichael's permission to do so.

Mr Carmichael said, while he had not seen the document before it was published by the newspaper, he was "aware of its content and agreed that my special adviser should make it public".

The Lib Dem MP for Orkney and Shetland also accepted "full responsibility for the publication".

Analysis by James Cook, Scotland correspondent

The day this story broke was a rollercoaster ride for Nicola Sturgeon.

She had just emerged from a stellar performance in a televised leaders' debate and was cheered by dozens of supporters on the streets of Edinburgh.

Then she came crashing down to earth with the claim that she preferred the Tories to Labour: toxic for the SNP.

Ms Sturgeon appeared genuinely furious. It was, she insisted, simply not true.

Now her opponent, Alistair Carmichael, has accepted that she was right and the story, planted in the press on his orders, was wrong.

Not only that, he has accepted that he did not tell the truth when he told Channel 4 News on 5 April that the first he had been aware of the memo was when he was told about it by a journalist.

Now the first minister is suggesting that Mr Carmichael should "consider his position", the polite way of saying he should resign.

Whether or not he does so, the former Scottish Secretary's reputation has now been tarnished; the damage done, as so often in politics, not by the leak but by the lie.

Ms Sturgeon said Mr Carmichael, who had been a minister in the Tory-Lib Dem coalition government before the election, had attempted to cover up his involvement in the leak - and was only admitting it now "because he has been caught".

She added: "Mr Carmichael said at the time that the first he was aware of this matter was when he received a call from a journalist, but we now know that this is simply untrue. The false memo was leaked by a special adviser acting under the authority of Mr Carmichael.

"He knew all about it, but said in public that he knew nothing until a journalist phoned him.

"As well as the original dirty trick, which was bad enough, Mr Carmichael then tried to cover it up - and is only admitting it now because he got caught.

"He needs to seriously reflect on that - and reflect on whether his actions and attempt to cover them up are consistent with his position as an honourable member of the House of Commons."

The memo was written following a discussion between the civil servant, who has not been named, and the French Consul-General about a meeting Ms Sturgeon had with Ms Bermann.

It stated that part of the conversation between the ambassador and the first minister might well have been "lost in translation".

Image copyright other Image caption Ms Sturgeon has tweeted Mr Carmichael's letter of apology

At the time, Ms Sturgeon said she rejected the claim "100%", while the French consul-general in Edinburgh, Pierre-Alain Coffinier, also said the memo was not accurate and that Ms Sturgeon had not expressed any preference for a prime minister.

The leak inquiry, which was ordered by the Cabinet Secretary Sir Jeremy Heywood, concluded that Mr Roddin's official mobile phone was used to call the Telegraph journalist and that Mr Carmichael "could and should have stopped the sharing of the memo".

Mr Carmichael has admitted that he should not have let Mr Roddin leak the memo.

Mr Carmichael, who is now the only Liberal Democrat MP in Scotland, has written to Ms Sturgeon and Ms Bermann to apologise - describing the leak as a "breach of protocol".

He said that, had he still been a government minister, he would have "considered this to be a matter that required my resignation".

But he told BBC Shetland that the affair does not affect his work as an MP.

Mr Carmichael held his seat at the election after finishing just 817 votes ahead of the SNP. He had been defending a majority of 9,928.

Ms Sturgeon said she accepted Mr Carmichael's apology. The French embassy said it would not be commenting on the matter.

'Lost in translation'

Neither Mr Carmichael nor Mr Roddin will take their severance payments as cabinet minister and special adviser. Generally, a lump sum, equivalent to three months of annual ministerial salary, is payable when a minister ceases to hold office.

The Cabinet Office report said the civil servant who wrote the memo believed it to have been an accurate record of the conversation that took place between him and the French Consul-General, but pointed out that he had already highlighted that it could have been "lost in translation".

The Cabinet Secretary Sir Jeremy Haywood concluded that there was no reason to doubt that the civil servant recorded accurately what he thought he had heard.

The report said: "Senior officials who have worked with him say that he is reliable and has no history of inaccurate reporting, impropriety or security lapses.

"The Cabinet Secretary has concluded that there is no reason to doubt that he recorded accurately what he thought he had heard. There is no evidence of any political motivation or 'dirty tricks'."