Following a vote to leave the EU, the UK would face complex negotiations to manage its withdrawal. Given the all-encompassing nature of EU membership, a crucial question is whether Whitehall – particularly the Foreign Office (FCO) and Cabinet Office – is sufficiently equipped and resourced to achieve a satisfactory outcome (whatever that might entail).

No country has left the EU, so there is no template to follow. We do know that negotiations would need to address both a British withdrawal and its new relationship with the EU, and be ratified by the remaining EU member states as well as the UK and European parliaments. There are several possibilities for this: Britain could seek to be part of the European Economic Area, following the Norwegian model (although David Cameron has ruled this out), or instead emulate a more detached Swiss-style relationship through the European Free Trade Area.

A special, British model is also possible, as the UK expects more than to be grouped with Norway and Switzerland (pdf) in the event of a Brexit. Whatever the decision, at least three new treaties may be required, giving an idea of the scale of what must be agreed within the two-year notice period – although there are provisions for this to be extended.

How will this process be managed? When states become EU members they must agree and transpose into law 100,000-plus pages of the EU acquis (accumulated legislation), which gives us an idea of what reverse-engineering this process might entail. All aspects of UK membership would have to be addressed, with no part of Whitehall unaffected. This will pose a significant administrative challenge domestically and in Brussels.

Sophisticated machinery exists to manage British European policy, which would logically underpin the negotiating process – although unsurprisingly the government refuses to comment on specific arrangements in the event of a leave vote. The so-called triangle of the FCO, Cabinet Office and UK permanent representation in Brussels (UKRep) oversees European policy coordination, but each government department manages the details of their specific policy responsibilities, while the Treasury also has a significant say.

The Cabinet Office would be the logical domestic hub for the negotiations, with the FCO contributing expertise in terms of treaty-making and using the UK’s broader diplomatic network in pursuit of an agreement. UKRep could be expected to lead negotiations in Brussels while also providing a conduit for on-the-ground intelligence and advice on negotiating strategy. The economic significance of leaving the EU means significant Treasury involvement should also be expected. The process will require careful management and political leadership to contain tensions over priorities.

Stretched to the limit

Do the main institutional actors have the resources, capacity, headcount and expertise to do this, while simultaneously managing the ongoing business of government? Although Cabinet Office staff numbers have risen since 2013, it will require additional resources, particularly in expertise, to manage the domestic component of the negotiations.

In Brussels, the scope of the agreement the UK will be pursuing will place considerable demands on UKRep. Officials will be seeking to persuade soon-to-be former EU partners, some of whom may be ambivalent about Britain’s decision to withdraw and feel no great compunction to make things easy. (Indeed, some may wish to make withdrawal as painful as possible pour encourager les autres.) This in turn will place a burden on the FCO, which is currently enduring one of its most challenging periods in terms of pressure on resources and capabilities.

In its 2014 report (pdf), the foreign affairs select committee declared that as a consequence of the stringent budget settlement imposed under the 2010 spending review – described as one of the tightest in Whitehall (pdf) – the FCO “is being stretched almost to the limit”.

Doing more with less has been a constant requirement of the FCO in recent years. Moreover, dealing with intense periods of EU activity is not new, as seen during Britain’s six-month EU presidency in 2005 when its European team expanded to 200. But Brexit negotiations will be of a different magnitude. It will not be just a matter of reassigning resources for the duration of the negotiations, there is also the question of whether the FCO can access the required European expertise. At the same time, it will be seeking to manage the impact of a Brexit on UK relations with third parties, as well as dealing with the ongoing foreign policy matters for which it is responsible.

The UK’s administrative structures will face a test unprecedented in scale and complexity – and this will be happening after a decade or more of cuts in resources and spending.

While Britain’s coordination machinery is considered efficient and effective, this alone is not enough to guarantee success. For policymakers and politicians, the challenge will be to achieve the best possible deal with the resources available. Their ability to do this may well determine the quality of any final withdrawal agreement.

Nicholas Wright is a teaching fellow in EU politics at University College London

This is an edited version of a blog which originally appeared on the LSE BrexitVote blog

Talk to us on Twitter via @Guardianpublic and sign up for your free weekly Guardian Public Leaders newsletter with news and analysis sent direct to you every Thursday.