A statement issued by Buckingham Palace just after midday spoke of the Queen’s “deep sorrow” following his death at Windsor Castle on Friday morning.
The PM said the Duke of Edinburgh inspired “countless young people”.
He was the longest-serving royal consort in British history.
Announcing the duke’s death, the Palace said: “It is with deep sorrow that Her Majesty The Queen announces the death of her beloved husband.
“The Royal Family join with people around the world in mourning his loss.”
It is understood that the Prince of Wales travelled to Windsor Castle to visit his mother on Friday afternoon.
Speaking at Downing Street, prime minister Boris Johnson added that the duke had “earned the affection of generations here in the United Kingdom, across the Commonwealth, and around the world”.
Meanwhile, Justin Welby, the Archbishop of Canterbury, said he “consistently put the interests of others ahead of his own and, in so doing, provided an outstanding example of Christian service”.
In tribute to the duke, Westminster Abbey tolled its tenor bell once every 60 seconds for 99 times from 18:00 BST – to honour each year of his life.
Earlier, the flag at Buckingham Palace was lowered to half-mast and a notice was posted on the gates to mark the duke’s death.
People placed floral tributes outside the central London landmark, while hundreds visited Windsor Castle to pay their respects.
However, the government urged the public not to gather or leave tributes at royal residences amid the coronavirus pandemic.
The Royal Family has asked people to consider making a donation to a charity instead of leaving flowers in memory of the duke, and an online book of condolence has been launched on the official royal website for those who wish to send messages.
A message on the website of the Duke and Duchess of Sussex’s non-profit organisation Archewell paid tribute to the “loving memory” of the Duke of Edinburgh, saying: “Thank you for your service… you will be greatly missed.”
From midday on Saturday, a 41-gun salute will take place for Prince Philip in cities including London, Edinburgh, Cardiff and Belfast, as well as in Gibraltar and at sea from Royal Navy warships, the Ministry of Defence said. They will be broadcast online and on television for the public to watch from home.
All UK government buildings have been told to fly official flags at half-mast in tribute to the duke until 08:00 BST on the day after the duke’s funeral.