Britain's Prince Philip, a constant presence at Queen Elizabeth II's side for decades, died Friday at age 99, Buckingham Palace announced.

The death of the Duke of Edinburgh is a profound loss for the 94-year-old monarch, who once described him as her "strength and stay all these years".

The outspoken former navy commander devoted much of his life as the queen's consort to charity work -- but was notorious for numerous gaffes, many deemed downright offensive.

He was admitted to hospital on February 16, 2021, and went home after a month during which he was treated for a pre-existing heart condition and an infection.

Announcing his passing, BBC television played the national anthem over a picture of Philip in his prime, dressed in military dress uniform.

Flags were lowered to half-mast on royal and government buildings and a notice announcing his death pinned to the gates of Buckingham Palace.

"We give thanks, as a nation and a kingdom, for the extraordinary life and work of Prince Philip, Duke of Edinburgh," Prime Minister Boris Johnson said outside 10 Downing Street.

Johnson said Philip had "earned the affection of generations" at home, in the Commonwealth and across the world after first serving in the Royal Navy and then over nearly eight decades beside the queen.

Philip retired from public duties in 2017 at the age of 96.

Obituary: Prince Philip - the strength behind the British crown

His death came just months before his 100th birthday in June -- an event typically marked in Britain with a congratulatory message from the queen, who is now Britain's longest-serving monarch.

The couple, who celebrated their 73rd wedding anniversary in November, had been living largely in isolation at Windsor Castle, west of London, because their advanced age put them at heightened risk from Covid-19.

Philip and the queen received their first vaccinations against the virus in January.

Few public appearances

Philip was no stranger to health issues.

He was previously fitted with a stent in 2011 after suffering from a blocked artery.

He also had a hip operation in 2018 and in January 2019, he emerged unscathed after his vehicle was involved in a traffic accident that injured two people near the monarch's Sandringham estate in eastern England.

The prince then spent four nights in hospital in December that year, receiving treatment for what was described as a "pre-existing condition".

He was discharged on Christmas Eve, in time to rejoin the rest of the royal family for the festive period.

Since the pandemic, Philip has made few public appearances.

RTL

June 14, 2003 Britain's Queen Elizabeth II (L) and Britain's Prince Philip, Duke of Edinburgh (R) wave from the balcony of Buckingham Palace in London, during a flypast for the trooping of the colour. / © AFP/File

He was last seen at a staged appearance at a military ceremony at Windsor Castle in July, days after attending the wedding ceremony of his granddaughter Princess Beatrice.

In November, he and the queen marked the latest anniversary of their 1947 nuptials by releasing a photograph of them together, again at Windsor.

Philip and the queen have four children -- Charles, Anne, Andrew and Edward -- eight grandchildren and nine great-grandchildren.

Shelved personal ambitions

Philip, the longest-serving consort in British history, was born on the island of Corfu with Danish and Greek royal titles.

He fled the country when he was just 18 months old with his parents and four sisters, after his uncle, king Constantine of Greece, was forced to abdicate.

The family initially settled in France.

Philip was formally introduced to princess Elizabeth, the future queen, in July 1939 and they kept in touch during the war, meeting on a number of occasions.

The pair married in Westminster Abbey in London in 1947.

A rising star in the British navy, Philip had reached the rank of commander by the time Elizabeth ascended to the throne in 1952. He eventually shelved his personal ambitions to support his wife in the role.

Over the ensuing decades he was involved in numerous charities, including the World Wildlife Fund For Nature and the Duke of Edinburgh Award scheme for young people.