AUSTIN (KXAN/AP) — Through its Twitter account, the Royal Family announced Friday that Prince Philip died at Windsor Castle. He was 99 years old.

Prince Philip, the husband of Queen Elizabeth II, underwent a heart procedure to help a pre-existing condition in early March. He retired in 2017 and rarely appeared in public since then.

The longest-serving royal consort in British history, Philip married the then-Princess Elizabeth in 1947. He and the queen have four children, eight grandchildren and nine great-grandchildren.

Former President George W. Bush offered his family’s condolences in a statement Friday morning.

Laura and I are saddened to learn of the passing of Prince Philip, the Duke of Edinburgh. Throughout his long and remarkable life, he devoted himself to worthy causes and to others. He represented the United Kingdom with dignity and brought boundless strength and support to the sovereign. Laura and I are fortunate to have enjoyed the charm and wit of his company, and we know how much he will be missed. We join those around the world offering heartfelt condolences to Her Majesty Queen Elizabeth II and the entire Royal Family.

George W. Bush

His life spanned nearly a century of European history, starting with his birth as a member of the Greek royal family and ending as Britain’s longest serving consort during a turbulent reign in which the thousand-year-old monarchy was forced to reinvent itself for the 21st century.

He was known for his occasionally racist and sexist remarks — and for gamely fulfilling more than 20,000 royal engagements to boost British interests at home and abroad. He headed hundreds of charities, founded programs that helped British schoolchildren participate in challenging outdoor adventures, and played a prominent part in raising his four children, including his eldest son, Prince Charles, the heir to the throne.

Philip, who was given the title Duke of Edinburgh on his wedding day, saw his sole role as providing support for his wife, who began her reign as Britain retreated from empire and steered the monarchy through decades of declining social deference and U.K. power into a modern world where people demand intimacy from their icons.

In the 1970s, Michael Parker, an old navy friend and former private secretary of the prince, said of him: “He told me the first day he offered me my job, that his job — first, second and last — was never to let her down.”

The queen, a very private person not given to extravagant displays of affection, once called him “her rock” in public.

In private, Philip called his wife Lilibet; but he referred to her in conversation with others as “The Queen.”

Over the decades, Philip’s image changed from that of handsome, dashing athlete to arrogant and insensitive curmudgeon. In his later years, the image finally settled into that of droll and philosophical observer of the times, an elderly, craggy-faced man who maintained his military bearing despite ailments.

The popular Netflix series “The Crown” gave Philip a central role, with a slightly racy, swashbuckling image. He never commented on it in public, but the portrayal struck a chord with many Britons, including younger viewers who had only known him as an elderly man.

Philip’s position was a challenging one — there is no official role for the husband of a sovereign queen — and his life was marked by extraordinary contradictions between his public and private duties. He always walked three paces behind his wife in public, in a show of deference to the monarch, but he was the head of the family in private. Still, his son Charles, as heir to the throne, had a larger income, as well as access to the high-level government papers Philip was not permitted to see.

Philip often took a wry approach to his unusual place at the royal table.

“Constitutionally, I don’t exist,” said Philip, who in 2009 became the longest-serving consort in British history, surpassing Queen Charlotte, who married King George III in the18th century.

He frequently struggled to find his place — a friction that would later be echoed in his grandson Prince Harry’s decision to give up royal duties.

“There was no precedent,” he said in a rare interview with the BBC to mark his 90th birthday. “If I asked somebody, ‘What do you expect me to do?’ they all looked blank.”

But having given up a promising naval career to become consort when Elizabeth became queen at age 25, Philip was not content to stay on the sidelines and enjoy a life of ease and wealth. He promoted British industry and science, espoused environmental preservation long before it became fashionable, and traveled widely and frequently in support of his many charities.