Buckingham Palace said the prince, who is also known as the duke of Edinburgh, died in the morning at Windsor Castle.
Queen Elizabeth II (L) and her husband Prince Philip attend the State Opening of Parliament. Photo: PA Wire/dpa/file photo.
"It is with deep sorrow that Her Majesty The Queen announces the death of her beloved husband, His Royal Highness The Prince Philip, Duke of Edinburgh," the statement said.
"The Royal Family join with people around the world in mourning his loss."
Philip recently had a month-long spell in hospital and was recovering at the castle, some 30 kilometres west of London.
He was taken to London's King Edward VII Hospital on 16 February as "a precautionary measure" for an undisclosed infection and was expected to remain there "for a few days of observation and rest," the palace said at the time.
His illness was not related to the coronavirus.
He was then moved to a new hospital in London, St Bartholomew's, where doctors performed testing and performed an operation on him for a pre-existing heart condition.
Prince Philip leaves King Edward VII's Hospital where he had been staying for treatment. Photo: Dominic Lipinski/dpa.
The prince was discharged on 16 March.
Tributes began pouring in for the duke after the news about his death was announced.
First Minister for Scotland, Nicola Sturgeon, published a tweet which said: "I am saddened by news that the Duke of Edinburgh has died. I send my personal and deepest condolences ... to Her Majesty The Queen and her family."
Nicholas Soames, the grandson of wartime prime minister Sir Winston Churchill, tweeted: “The death of Prince Philip marks the passing of a truly remarkable man who lived a life of impeccable and dedicated service to his Queen and Country."
Philip was born into Greek and Danish royal families in 1921 on the Greek island of Corfu.
His family left Greece when Philip was 1-years-old after the end of the Greco-Turkish War.
He spent his childhood in France and Germany, and then later moved to Britain.
Philip joined the Navy in 1939, during which time he met the-then Princess Elizabeth.
Then British Princess Elizabeth (L) and Prince Philip pose for pictures at Buckingham Palace after their wedding ceremony. Photo: PA Wire/dpa.
Married in 1947
The pair began writing to each other and then married in 1947, prior to her ascension to the throne in 1952.
He renounced his Greek royal title, allowing him to become a British citizen.
Philip was also given the title His Royal Highness and named as the Duke of Edinburgh by the Queen's father, King George VI, in respect of their marriage.
Philip retired from active naval service in 1951 and was made a British prince in 1957. Since then, he had been the queen's consort, where he supported the Queen in her role as the reigning monarch, and also invested his time in supporting conservation and engineering organisations.
Queen Elizabeth II (L) and her husband Prince Philip wave from the balcony after her Coronation. Photo: PA Wire/dpa.
He was a patron, president or a member of more than 750 organisations.
He retired from public duties in 2017, meaning while he is still a member of the organisations, he no longer attended public engagements.
The couple had four children together - Charles, Prince of Wales, Anne, Princess Royal, Prince Andrew, Duke of York, and Prince Edward, Earl of Wessex - eight grandchildren and 10 great-grandchildren.
*Portrait of the Duke of Edinburgh in the uniform of a Royal Navy lieutenant: PA Wire/dpa.