Cameron was severely criticized in a House of Commons report for failing to plan for both outcomes of the In-Out referendum on UK membership of the EU and critical of his use of civil servants to make the government case.
"The manner of the presentation of government reports, particularly those from the Treasury, and the decision to spend US$13 million on sending a leaflet advocating a Remain vote to all UK households, were inappropriate and counterproductive for the Government," the report said.
"While it is perfectly legitimate for the Prime Minister and government to take an official position during a referendum campaign, the fairness, and legitimacy, of a referendum rests on a careful and restrained use of the machinery of government. Unfortunately, many of the Government's actions in the run-up to the referendum appear to have increased public distrust."
"The use of the machinery of government during the referendum contributed to a perception that the civil service [was], in some way, biased. That any such perception exists is deeply regrettable and was entirely avoidable. We recommend that the Government heed the lessons from this referendum of the implications of the use of the machinery of government during referendums on public trust and confidence in the institutions of government," it said.
Theresa May has called a snap election in order to push for an increased majority as well as a mandate for her version of Brexit — hard Brexit — to silence some MPs — mainly from the Scottish National Party and the Liberal Democrats — who want a "soft" exit.
However, she has been warned that she should be careful — during the so-called period of purdah before the election — not to allow civil servants to take side or be used for political purposes.
"During an election campaign, ministers continue to serve, but have to separate their role in restricted government business from their campaign roles. The civil service continues to support the Government throughout the campaign, but it does so under stricter rules — known by many under the old term 'purdah,' " said Catherine Haddon, Fellow at the London-based Institute for Government, in a blog.
"During the campaign period, no new appointments, contracts or big areas of policy can be announced and civil servants cannot provide support to ministers working on the campaign," she said.
The UK Civil Service Code makes clear that all civil servants must do the work of government, throughout the campaign, with 'purdah' beginning April 22 — more than a week before the formal dissolution of Parliament and start of the campaign.
"The basic principle for civil servants is not to undertake any activity that could call into question their political impartiality or that could give rise to criticism that public resources are being used for party political purposes. This principle applies to all staff working in departments," the code states.
In the aftermath of the report into the June 2016 referendum, in which Cameron was heavily criticized, May — who has put Brexit at the heart of the upcoming election — will have to be careful in the way she presents her case.