Food and medicine shortages after a no-deal Brexit could trigger riots in prisons, ministers fear.

A leaked document warns of “severe consequences” and sets out the need for “a clear understanding of the ‘real’ operational impact” of crashing out of the EU.

The memo was withdrawn from the database of government contracts after the Ministry of Justice was alerted to its contents, which were not properly redacted by officials.

Phillip Lee, a Conservative MP and former justice minister, seized on the warning, saying: “It’s clear that no deal would be disastrous for our country.”

The supporter of the People’s Vote campaign 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.”

Richard Burgon, Labour’s shadow justice secretary, said: “This shocking revelation is yet more evidence of the threat a no-deal Brexit poses to our justice system.

Put It To The People march: Best of The Independent’s pictures Show all 24 1 /24 Put It To The People march: Best of The Independent’s pictures Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent Put It To The People march: Best of The Independent’s pictures Put It To The People protest 23 March 2019 Angela Christofilou/The Independent Angela Christofilou/The Independent

“From ending access to the European Arrest Warrant, to our prisons being up for grabs by American corporations in a post-Brexit US 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.”

Only last week David Gauke, the justice secretary, admitted to MPs that a no-deal Brexit risked “significant impacts across the justice system, including potential disruption to goods and services to our prisons”.

The fears are revealed in a consultancy agreement, worth £458,000, awarded to the firm Ernst & Young and seen by the POLITICO website.

It set out how Ernst & Young would work with the department, and other areas of government, on contingency plans for either an orderly Brexit with a withdrawal deal or a no-deal departure.

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

Warning it was “necessary to prioritise mitigation actions”, the document added: “Refining the focus of planning efforts is imperative to ensure that the most critical contracts can continue undisrupted post-EU Exit.

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

A spokesperson for the Ministry of Justice did not address the fears about 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.