The head of the civil service, Sir Jeremy Heywood, has sought to defend the organisation from Eurosceptic claims of bias in the run-up to the UK's vote to leave the European Union.
Ahead of June's referendum, Heywood came under sustained attack from Leave campaigners, who argued that the civil service machine – which has a duty to support the government of the day – was being used to promote the Remain side's message.
Critics also hit out at guidance from the cabinet secretary which limited the support departmental officials could offers to ministers who chose to campaign for Brexit.
Civil Service World's dedicated Brexit hub
EU referendum row: DWP minister attacks Heywood over purdah guidance
Jeremy Heywood: civil service did "significant" Brexit "thinking" in final weeks of campaign
Leave campaigner Priti Patel – who has since gone on to become international development secretary – took aim at Heywood personally, accusing him of an "unconstitutional act [that] threatens the reputation of the civil service".
But, in his first major article on Brexit since the vote, the cabinet secretary moved to counter those attacks, as well as claims that the civil service had failed to adequately prepare for a vote to leave.
"The civil service did its job" – Jeremy Heywood
Writing in the official Whitehall journal Civil Service Quarterly, Heywood defended the analysis produced by the civil service during the campaign, saying officials had been "scrupulous in making sure that all documents issued were factually correct and objective".
"Our core values remain the best guide to how we conduct ourselves in all circumstances; and we produced work as we should, at pace and with accuracy. As I have said elsewhere: 'The civil service did its job.'"
During the campaign, the civil service was required to support the government's official position of advocating a Remain vote, and Heywood has previously told MPs that the then-prime minister, David Cameron, imposed a "red line" on contact with Brexit campaigners during that time, preventing detailed planning.
But, in his latest article, Heywood said those who attacked the civil service for a lack of planning showed "little appreciation of the constitutional and propriety framework in which we operate", as well as the "practical difficulty of producing a comprehensive plan for such a multi-faceted proposition as Brexit".
He added: "Within these constraints, we used the time available to do important work.
"To be ready to act on the government’s direction we wanted to understand the possible alternatives to EU membership, such as the requirements for membership of the European Free Trade Association; the sort of trade agreements reached by other countries outside the EU; what Brexit might mean for the economy; and the organisational implications of a ‘no’ vote, including the need to create an international trade department. This background analysis is now proving its worth."
"Hugely encouraged"
The cabinet secretary also sought to counter claims that the two new Brexit-focused departments set up by Theresa May when she took over from Cameron in the summer would struggle to recruit the right staff.
"Despite the sceptics asking, 'How are you going to attract the talent you need?', I am hugely encouraged by the large number of enthusiastic civil servants who have queued up to join the two new departments," Heywood wrote.
The Department for Exiting the European Union has, Heywood revealed, received "around 250" applications for just seven director-level roles and its "20 or so" deputy director jobs.
"I am hugely encouraged by the large number of enthusiastic civil servants who have queued up to join the two new departments" – Jeremy Heywood
Heywood added: "To date, across government, DExEU has received expressions of interest from 168 organisations and 894 individuals offering support. They are working through the applications and considering how best to use this pool of talent."
There has also been much attention paid to Whitehall's lack of trade negotiation expertise after decades of handing responsibility over to the EU. The cabinet secretary acknowledged that gap, saying the UK was "short of certain specialist personnel and skills for tasks that will be central to Brexit and our future international relationships, such as trade negotiations".
But he confirmed that the civil service had "opened ourselves to approaches from external consultancies, accountancy firms, project management specialists, and many individuals" in a bid to plug those shortages.
Some eurosceptics are, however, unlikely to be placated by Heywood's article. Indeed, Tory MP Steve Baker – who over the summer called for "emergency legislation" to ensure civil servants working against Brexit could be "summarily fired" – told The Telegraph he still believed the government's Brexit analysis had been "partisan propaganda".
"The entire civil service machine was mobilised to compaign as strongly as possible," he added.