The U.K. government is concerned that a no-deal Brexit could lead to prison riots over food and medicine shortages, according to a consultancy contract awarded by the Ministry of Justice.

The document raises the prospect of “severe consequences” if contingency measures are not carried out by civil servants.

The concerns are revealed in a Brexit consultancy agreement worth £458,000, seen by POLITICO, that was awarded to the consultancy firm Ernst & Young in January but only published by the government last week. Yet the document, detailing advisory work on “successful mitigation of risks of EU Exit,” was not properly redacted by officials, meaning that sections intended to be cut from the text released publicly could still be read.

The improperly redacted sections laid out that Ernst & Young would work with the department and other areas of government to push forward contingency plans for either an orderly Brexit with a withdrawal deal or a no-deal scenario.

In the event of no deal, it said: “Not progressing these actions plans could have severe consequences for MoJ Operations, e.g. unrest in prison because of undersupply of foods or medicines.

“This shocking revelation is yet more evidence of the threat a no-deal Brexit poses to our justice system" — Shadow Justice Secretary Richard Burgon

“A clear understanding of the ‘real’ operational impact of a ‘no deal’ is necessary to prioritise mitigation actions. Refining the focus of planning efforts is imperative to ensure that the most critical contracts can continue undisrupted post EU Exit,” the contract reads.

The redaction error also revealed the names of civil service personnel working on the contract, including the commercial director who signed it off.

After POLITICO approached the department with questions about the contract, the link to the document was removed from the government's contracts database.

Former Justice Minister Phillip Lee, speaking on behalf of the anti-Brexit People’s Vote campaign, said: “It’s clear that no deal would be disastrous for our country, and it would be a democratic outrage for any prime minister to try and force this on us without the consent of the people. Botched redactions like this just show how desperate the Government has become."

He added: “No one voted for unrest in prisons, shortages of food supplies or any of the other indignities that could result from a disastrous no deal. This is yet another example of how the Brexit being delivered is a million miles away from the one that was being promised in 2016."

Shadow Justice Secretary Richard Burgon said: “This shocking revelation is yet more evidence of the threat a no-deal Brexit poses to our justice system."

"From ending access to the European Arrest Warrant, to our prisons being up for grabs by American corporations in a post-Brexit U.S. trade deal, it is clear that a no-deal Brexit risks further damaging our justice system, which has already been weakened by nearly a decade of cruel Tory austerity.”

Justice Secretary David Gauke last week told the Commons a no-deal Brexit risks “significant impacts across the justice system, including potential disruption to goods and services to our prisons.”

A spokesperson for the department did not directly address the concerns about the potential for violence in prisons, but said: “The government has responsibly been preparing for ‘no deal’ for the last three years, including to ensure the continued supply of food and medicines in such an event."

“The very purpose of this contract and our wider planning is to minimize disruption to the justice system.”

Ministers have laid out a scheme to reserve shipping capacity for medicines in the event of a no-deal Brexit, which it believes will allow for uninterrupted supply assuming everything goes to plan.

The department also pointed to the resilience of the food supply chains when hit by adverse weather and transport issues, and noted that officials have been meeting regularly with industry to ensure Britain is prepared for Brexit.

The contract between the MoJ and Ernst & Young was signed in January under the assumption Brexit would happen on the original exit date of March 29. It was later updated after the departure was delayed to state that it would last “as long as necessary” up to March 2020.

Previous Brexit-related government contracts have included monitoring consumer trends of evidence of stockpiling, diplomatic training for civil servants and extra ferry capacity (from a company that had no ships).

POLITICO found the awarded contract through the Tussell database of government tenders. Ernst & Young did not respond to a request for comment by time of publication.

This article is part of POLITICO’s premium Brexit service for professionals: Brexit Pro. To test our our expert policy coverage of the implications and next steps per industry, email pro@politico.eu for a complimentary trial.