The SNP Government appreciates the benefits of a joint UK civil service, despite accusations of foul play in the run up to the independence referendum and the party’s manifesto pledge to set up a separate Scottish system, according to two former top mandarins.

Lord Kerslake and Lord O'Donnell, both ex-heads of the civil service, said that the SNP recognised the “value” of the current UK-wide set-up.

The role of officials was one of the most high-profile controversies in the run up to 2014’s independence referendum.

There was an outcry when the top civil servant in the Treasury published his advice to George Osborne warning against a currency union with an independent Scotland, amid accusations he had breached strict impartiality rules.

A report by a committee of MPs later found that Sir Nicholas Macpherson has been “compromised” by that decision.

Last night the Scottish Government insisted that it remained committed to developing a separate Scottish civil service.

But earlier this week Lord O’Donnell, who as Gus O'Donnell was cabinet secretary to three Prime Ministers including David Cameron, told members of the House of Lords Constitution Committee: “The discussions I have had with Alex Salmond (when he was First Minister) – and the odd chat with Nicola Sturgeon – suggested to me that they see the value of a unified civil service”.

That view was echoed by Lord Kerslake, who stepped down as the head of the civil service last year.

He told the same committee that when it came to the pledge to create a separate Scottish civil service: “Even though it was in the manifesto I don’t recall big conversations happening. Though that could change, of course”.

He added: “All I can say is that I deduce from that that they saw the value of the current arrangements.”

The Scottish Government said it was still committed to developing a separate service.

A spokesman said: "Scottish Government policy is to establish a fully devolved, distinct Scottish civil service and we sought full powers over the Scottish administration in our submission to the Smith Commission.”

He added: “While under the current arrangements many aspects of managing the civil service in Scotland are already delegated to Scottish ministers and Scottish Government staff are employed to serve Scottish ministers in accordance with the Civil Service Code, full powers would better serve the reality of devolved government."

Giving evidence on the future of the Union, both peers defended the benefits of a joint civil service.

They also argued that the independence referendum had proven that there was no need for separate systems, because officials had shown they could remain impartial and work together even while the ministers they worked for pursued rival policy objectives.

They faced questions from peers about the Northern Irish civil service, which is not part of the UK-wide system.

Lord O’Donnell told peers that such an approach was “not impossible but (had) definite drawbacks”.

He pointed to the fact that Northern Irish officials were not involved in the regular Wednesday morning planning meeting and so were not “listening to everything we were doing as a government”.

Last year MPs on the Public Administration Committee MPs found that the currency advice was made public only "because it suited UK ministers' political objectives" in the fight for a No vote.

The same committee also hit out at the Scottish Government's White Paper on independence, saying that it did not meet the "factual standards" expected and raised questions about the use of public money "for partisan purposes".

The Treasury defended its decision to publish Sir Nicholas's warning, claiming that the independence referendum had been an "exceptional case".

Both governments have defended the role that their civil servants played during the referendum, insisting that they behaved correctly.

Around 44,000 officials work in Scotland.

Approximately 27,000 work for UK government departments, such as the Department for Work and Pensions (DWP), while around 17,000 work for the Scottish Government.