Prince Philip died peacefully at Windsor Castle two months before his 100th birthday. [Courtesy]

Prince Philip has died peacefully at Windsor Castle at the age of 99, just weeks after he was released from a London hospital and reunited with the Queen. The Duke of Edinburgh, who had recently been treated for a pre-existing heart condition and an infection, died on Friday morning, just two months before his 100th birthday.

A statement from Buckingham Palace said: “It is with deep sorrow that Her Majesty The Queen has announced the death of her beloved husband, His Royal Highness The Prince Philip, Duke of Edinburgh.

"His Royal Highness passed away peacefully this morning at Windsor Castle.

"Further announcements will made in due course. The Royal Family join with people around the world in mourning his loss."

The flags in Downing Street were lowered to half-mast following the announcement. Government ministers and other senior politicians offered tributes to the duke on social media.

Veterans minister Johnny Mercer tweeted: “Tragic news. A true patriot.” And vaccines minister Nadhim Zahawi posted: “This is a sad sad day for us all. May he rest in peace. RIP Great Prince.” The Duke of Edinburgh was once described by the Queen as her "strength and stay" and has been a constant presence by her side for more than 70 years.

Born in 1921, Philip served in the Royal Navy and has become known over the years for his jokes and gaffes. After he first met the Queen, Elizabeth "never looked at anyone else" and once Philip proposed his destiny as royal consort was sealed.

Putting aside his own career ambitions, he proved his strong sense of duty serving the country through hundreds of engagements every year, refusing to stop working even in his 90s. He became patron or president of 800 organisations, founded the Duke of Edinburgh Awards in 1956 and won a place in the nation's hearts for his no-nonsense attitude and witty quips, or "gaffes".

He leaves behind four children, eight grandchildren and eight great-grandchilden. Philip bowed out of public life in August 2017, retiring at the age of 96 with 22,219 solo engagements to his name.

It was perhaps an unexpected path for the boy born on June 10, 1921, on the Greek Island of Corfu and descended from Greek and Danish royalty. While not exactly from humble beginnings, Philip's childhood gave no clue that he would one day be the longest-serving British royal consort and a key figure at the heart of the world's most famous Royal Family.

His mother was Princess Alice of Battenberg and his father was Prince Andrew of Greece and Denmark and he was their only son with four older sisters. His family was exiled from Greece when he was a baby and Philip was educated in France, Germany and the UK.

He eventually joined the British Navy in 1939 age 18 and served in the British Forces during WWII. Elizabeth and Philip were distant cousins, and first met at a wedding in 1934 when she was only nine. But it was when they met again in 1939 that they began to exchange letters and fell in love.

They became secretly engaged in 1946, but the formal engagement was delayed until Elizabeth turned 21 in April 1947. Philip changed his name to Mountbatten - the anglicised version of Battenberg - before the wedding in order to sound more British and they were married in Westminster Abbey on November 20 1947.

Elizabeth's father King George VI, who she was very close to, wrote about giving her away: "When I handed your hand to the Archbishop, I felt I had lost something very precious." He added: "I can see that you are sublimely happy with Philip which is right but don't forget us, is the wish of your ever-loving and devoted... Papa."

In a letter to her parents on her honeymoon, Elizabeth wrote: “Philip is an angel. We behave as though we had belonged to each other for years.” And he wrote: “She is the only thing in this world which is absolutely real to me.”

It was not long before the couple became parents with the birth of Prince Charles in November 1948 shortly followed by Princess Anne in 1950. In 1949 Philip's naval career saw him stationed in Malta where he and Elizabeth enjoyed a carefree existence, attending dances and free to act like a normal husband and wife.

But on February 6, 1952, a huge responsibility fell on Elizabeth's young shoulders when her father died and she became Queen aged just 25. It was Philip who told his wife she was now Queen after news reached them in Kenya where they were staying in the Treetops hotel.

From that moment Philip's life also changed as his role became to support Elizabeth in her official duties.