Her son King Charles III said the death of his beloved mother was a “moment of great sadness” for him and his family and that her loss would be “deeply felt” around the world.
Senior royals had gathered at her Scottish estate after concerns grew about her health earlier on Thursday.
The Queen came to the throne in 1952 and witnessed enormous social change.
King Charles said: “We mourn profoundly the passing of a cherished sovereign and a much-loved mother.
“I know her loss will be deeply felt throughout the country, the realms and the Commonwealth, and by countless people around the world.”
He will lead the country in mourning as the new King and head of state for 14 Commonwealth realms. Camilla, his wife, becomes Queen Consort.
During the coming period, he said he and his family would be “comforted and sustained by our knowledge of the respect and deep affection in which the Queen was so widely held”.
In a statement, Buckingham Palace said: “The Queen died peacefully at Balmoral this afternoon.
“The King and the Queen Consort will remain at Balmoral this evening and will return to London tomorrow.”
All the Queen’s children travelled to Balmoral, near Aberdeen, after doctors placed the Queen under medical supervision.
Her grandson and now heir to the throne, Prince William, is also there, with his brother, Prince Harry, on his way.
Prime Minister Liz Truss, who was appointed by the Queen on Tuesday, said the monarch was the rock on which modern Britain was built, who had “provided us with the stability and strength that we needed”.
Speaking about the new King, she said: “We offer him our loyalty and devotion, just as his mother devoted so much, to so many, for so long.
“And with the passing of the second Elizabethan age, we usher in a new era in the magnificent history of our great country, exactly as Her Majesty would have wished, by saying the words ‘God save the King’.”
Queen Elizabeth II’s tenure as head of state spanned post-war austerity, the transition from empire to Commonwealth, the end of the Cold War and the UK’s entry into – and withdrawal from – the European Union.
Her reign spanned 15 prime ministers starting with Winston Churchill, born in 1874, and including Ms Truss, born 101 years later in 1975.
She held weekly audiences with her prime minister throughout her reign.
At Buckingham Palace in London, crowds awaiting updates on the Queen’s condition began crying as they heard of her death. The Union flag on top of the palace was lowered to half-mast at 18:30 BST and an official notice announcing the death was posted outside.
On the Queen’s death, Prince William and his wife, Catherine, became the Duke and Duchess of Cambridge and Cornwall.
The Queen was born Elizabeth Alexandra Mary Windsor, in Mayfair, London, on 21 April 1926.
Few could have foreseen she would become monarch but in December 1936 her uncle, Edward VIII, abdicated from the throne to marry the twice-divorced American, Wallis Simpson.
Elizabeth’s father became King George VI and, at age 10, Lilibet, as she was known in the family, became heir to the throne.
Within three years, Britain was at war with Nazi Germany. Elizabeth and her younger sister, Princess Margaret, spent much of wartime at Windsor Castle after their parents rejected suggestions they be evacuated to Canada.
After turning 18, Elizabeth spent five months with the Auxiliary Territorial Service and learned basic motor mechanic and driving skills. “I began to understand the esprit de corps that flourishes in the face of adversity,” she recalled later.
Through the war, she exchanged letters with her third cousin, Philip, Prince of Greece, who was serving in the Royal Navy. Their romance blossomed and the couple married at Westminster Abbey on 20 November 1947, with the prince taking the title of Duke of Edinburgh.
She would later describe him as “my strength and stay” through 74 years of marriage, before his death in 2021, aged 99.
Their first son, Charles, was born in 1948, followed by Princess Anne, in 1950, Prince Andrew, in 1960, and Prince Edward, in 1964. Between them, they gave their parents eight grandchildren and 12 great-grandchildren.
Princess Elizabeth was in Kenya in 1952, representing the ailing King, when Philip broke the news that her father had died. She immediately returned to London as the new Queen.
“It was all a very sudden kind of taking on and making the best job you can,” she later recalled.
Elizabeth was crowned at Westminster Abbey on 2 June 1953, aged 27, in front of a then-record TV audience estimated at more than 20 million people.
Subsequent decades would see great change, with the end of the British Empire overseas and the swinging ’60s sweeping away social norms at home.
Elizabeth reformed the monarchy for this less deferential age, engaging with the public through walkabouts, royal visits and attendance at public events. Her commitment to the Commonwealth was a constant – she visited every Commonwealth country at least once.
But there were periods of private and public pain. In 1992, the Queen’s “annus horribilis”, fire devastated Windsor Castle – a private residence as well as working palace – and three of her children’s marriages broke down.
After the death of Diana, Princess of Wales, in a car accident in Paris in 1997, the Queen drew criticism for appearing reluctant to respond publicly.
There were questions about the monarchy’s relevance in modern society.
“No institution… should expect to be free from the scrutiny of those who give it their loyalty and support, not to mention those who don’t,” she acknowledged.
As a 21-year-old princess, Elizabeth had vowed to devote her life to service.
Reflecting on those words decades later, during her Silver Jubilee in 1977, she declared: “Although that vow was made in my salad days, when I was green in judgment, I do not regret nor retract one word of it.”
That same commitment to serving was made 45 years later in a thank you letter to the nation on the weekend of her Platinum Jubilee in June.
The milestone was celebrated with a mix of state ceremonies and a colourful festival of all things British, as well as lively street parties.
Although the Queen’s health kept her from some events, she said: “My heart has been with you all.”