Queen Elizabeth II died of "old age" at 3:10 pm on September 8, according to her death certificate released on Thursday, or nearly three-and-a-half hours before the news was announced to the world.
The 96-year-old monarch died at her Balmoral Castle estate in the Scottish Highlands.
Elizabeth was the longest-serving monarch in British history and ruled as head of state for 70 years from 1952.
The certificate released by the National Records of Scotland shows her death was registered on September 16 by the queen's only daughter, Princess Anne.
Anne said in a statement issued by Buckingham Palace on September 13 that she was present during the last 24 hours of her mother's life.
The certificate lists the queen's place of death as "Balmoral Castle"; her "usual residence" as Windsor Castle; the name of her late husband Prince Philip, Duke of Edinburgh; and the full names of her father king George VI, and mother queen Elizabeth.
Under the section marked "occupation", it says: "Her Majesty The Queen".
Had the queen died in England, there would have been no requirement to register her death, as the law only applies to the sovereign's subjects.
But the legislation, which dates back to 1836, does not apply in Scotland, which has a separate legal system to England and Wales and stipulates that "the death of every person" shall be registered.
The timing of her death confirms that the queen's two younger sons, Princes Andrew and Edward, Edward's wife Sophie, and grandson Prince William did not make it to Balmoral in time.
They touched down at Aberdeen airport in northeast Scotland at 3:50 pm and arrived at Balmoral just after 5:00 pm. William's younger brother Prince Harry, arrived there later in the evening.
The queen's eldest son and successor, King Charles III, was said by his office to have travelled to Balmoral earlier in the day.
The cause of death given only as "old age", with no other cause listed, could end speculation that the queen was suffering from a particular condition in the last year of her life.
Two days before she passed away she performed her last major constitutional duty by accepting Boris Johnson's resignation as prime minister and asking his successor Liz Truss to form a government.
But official photographs of her smiling and leaning on a stick showed a deep purple bruise on the back of her hand.
Truss's spokesman later told reporters the new prime minister had been informed of the queen's death at 4:30 pm that day.
The news was officially released at 6:30pm.
The queen had been in declining health since spending an unscheduled night in a private London hospital in October 2021, forcing her to pull out of a string of official engagements.
Buckingham Palace attributed the cancellations to "episodic mobility problems" -- difficulties walking and standing that saw her take to using a stick and even a motorised buggy at public events.
Earlier this year she was laid low by a bout of Covid and later admitted it left her feeling "exhausted".