A major leak of top secret plans for what will happen when the Queen dies could result in a formal government investigation, The Mirror understands.

For the first time in granular detail, the full 10 day programme for what will happen in the days after the death of Her Majesty – codenamed Operation London Bridge – have been revealed.

It includes extraordinary details from confidential memos revealing fears over London becoming “full” for the first time as millions flock to the capital to pay their respects, flags having to be lowered within 10 minutes of the official announcement and Prince Charles embarking on a tour of the UK after being announced as King – known as Operation Spring Tide.

Palace officials were outraged over the leak of the sensitive and deeply intimate information, known only by a select band of government officials and specialist reporters.

The Cabinet Office will be tasked with first establishing which version of the documents has been published as they are updated regularly.

Their informal inquiry will also consider where the leak may have originated, as the plans are distributed to dozens of partners – including police, local government, Whitehall departments and the Royal household – in varying levels of detail.

Elements include the careful management of hundreds of privy counselors, including the PM and senior ministers attending The Accession Council — which includes senior government figures — meets at St. James’ Palace to proclaim King Charles the new sovereign.

The royal family’s website, social media and government websites will all be carefully managed – changing to a black holding page with a short statement confirming the queen’s death.

Cabinet Secretary Simon Case, who previously worked for Prince William, is not expected to make a decision on a formal investigation before next week.

One government source told the Mirror: “Neither the Palace nor the Government are particularly happy when leaks of this nature occur. But it is more annoying than damaging to the plans.”

The leak presumed to have come from Whitehall is likely to be of huge embarrassment to Prime Minister Boris Johnson, as he prepares to travel with his family to Scotland to spend a traditional weekend at Balmoral Castle with the Queen.