TAMPA, Fla. (WFLA/NEXSTAR) – The death of Queen Elizabeth II on Thursday launched “Operation Unicorn,” a contingency plan included in “Operation London Bridge” in the event that the queen died in Scotland, not England.

Meticulous plans for the death, retirement or abdication of Britain’s longest-reigning monarch have been in the works for decades.

On Thursday, years of planning went into place after the queen died at the age of 96 at Balmoral Castle in Aberdeenshire, Scotland, her private home and one of her favorite places. Leaked details from Operation Unicorn suggest that her coffin will rest at Balmoral before a lengthy procession by car to the Palace of Holyroodhouse two days after her death, The Guardian reports.

On the third day, the coffin is expected to be transported to St. Giles’ Cathedral in Edinburgh where it will stay for 24 hours, according to The Independent.

The following day, the Queen’s coffin will begin the journey back to London — either via a five-hour trip on the royal train or by plane as part of “Operation Overstudy.”

Once back in London, “Operation London Bridge,” also known by its code name “London Bridge Is Down,” will take over, according to Politico.

Operation London Bridge was set up in the 1960s and was updated several times each year, ensuring a smooth transition of the throne to her eldest son, Prince Charles, who is now king. The plans included a list of procedures and announcements of her death, the 10-day period of official mourning, and the details of her state funeral.

Leaked details of the plan indicated that following Elizabeth’s death, her private secretary, Sir Christopher Geidt, would be the first official to convey the news, according to The Guardian. Geidt would then contact the prime minister over a secure telephone line using the code phrase “London Bridge.” If the prime minister was not awake, civil servants would say “London Bridge is down.”

From there the news would be communicated to 15 governments outside the U.K. where the queen is the head of state and 36 other nations of the Commonwealth.

“For a time, she will be gone without our knowing it,” the Guardian report added. “The information will travel like the compressional wave ahead of an earthquake, detectable only by special equipment.”

The report stated that an announcement would be made to the Press Association and the rest of the world’s media simultaneously, but news of the queen’s death Thursday first appeared on the Twitter account of the royal family, according to the New York Times.

The palace website was transformed into a somber, single-page announcement of her death at Balmoral. The page, black with white lettering and a vignetted portrait of the queen, reads at the bottom, “The official website of the Royal Family is temporarily unavailable while appropriate changes are made.”

Get the latest Pennsylvania politics and election news with abc27 newsletters

Parliamentary business was suspended immediately on Thursday to allow authorities to prepare for a funeral, which will take place in less than two weeks, the BBC reports.