Alex Salmond has called for the Treasury's top civil servant to resign after a report by MPs said his "perceived impartiality" had been compromised during the run-up to the independence referendum.

The Commons Public Administration Select Committee criticised the publication of advice Sir Nicholas Macpherson gave Chancellor George Osborne that a currency union between an independent Scotland and the rest of the UK would be "fraught with difficulty".

The letter from Sir Nicholas, the Permanent Secretary to the Treasury, was only made public "because it suited ministers' political objectives in respect of the Scottish referendum", the committee said.

The MPs added that this had "compromised the perceived impartiality of one of the UK's most senior civil servants".

They also said the Scottish Government's independence White Paper had "raised questions about the use of public money for partisan purposes", as part of the 670-page long blueprint set out SNP pledges ahead of the 2016 Holyrood election.

The committee is now calling for the Civil Service Code to be "revised to specifically refer to referendums and provide civil servants across the UK with clear and definitive guidance on their role in respect of referendum campaigns".

But writing in his column for the Press And Journal newspaper, Mr Salmond insisted that Sir Nicholas's position is now "untenable".

He said: "He is totally distrusted by the Scottish Government.

"He has been openly criticised by a cross-party Commons committee. He is unrepentant about his behaviour.

"His time is well and truly up. Do the honourable thing and resign."

Sir Nicholas had written to the Chancellor on February 11 2014, just days before Mr Osborne made a speech in Edinburgh rejecting the Scottish Government's preferred option of a currency union with the rest of the UK, which would have allowed an independent Scotland to continue using the pound.

Sir Nicholas told the committee it was "highly unusual" for his advice to be made public, but said this had happened in a bid to reassure the markets.

In their report, the MPs said that, while the circumstances of the referendum campaign were "exceptional", the case presented in the letter "could have been presented in other ways and just as powerfully".

A spokesman for HM Treasury said: "As we have made clear before, the question of whether or not the UK would agree to a currency union was an exceptional case where it was important that the arguments were exposed in full before a referendum rather than after it."

Sir Nicholas also told a lecture to the Strand Group in January that he had published the advice "because I regarded it as my duty".

He said: "The British state's position was being impugned. Demonstrating that the political and official state were completely aligned would further strengthen the credibility of the Government's position. And it was important that the arguments were exposed before the referendum rather than after it."

The committee also raised "particular concerns" about the Scottish Government's flagship White Paper on independence.

The MPs said the Scotland's Future document had "included a description of the SNP's proposed programme for government that was contingent upon their winning the 2016 Scottish Parliament elections".

They stated: "This did not uphold the factual standards expected of a UK Government White Paper and therefore raised questions about the use of public money for partisan purposes."

The committee concluded that "parts of the White Paper should not have been included in a government publication".

A Scottish Government spokeswoman stated that the "White Paper, Scotland's Future, met the highest professional standards, that its contents were entirely appropriate for a government publication and was a proper use of public funds".

She added: "The Scottish and UK Governments have frequently set out policy intentions whose implementation depends on the outcome of future elections.

"Two examples of this are the UK Government's White Paper on the Calman Report and its Command Paper setting out how it plans to implement the Smith Commission proposals.

"Indeed, just last week, the UK Government Budget set out a range of policies of the governing parties where implementation will fall beyond the general election.

"It is the role of the Civil Service to work with the elected government of the day to implement its policies."

A Scottish Labour spokesman said: "The White Paper was a taxpayer-funded manifesto for the SNP, not a constitutional blueprint.

"It was wrong of the SNP Government to put impartial civil servants in this position.

"The SNP Government must reassure the people of Scotland that they will take heed of this report and stop interfering with the Civil Service."