LONDON — The death of Prince Philip, the steadfast husband of Queen Elizabeth II and the longest-serving royal consort in British history, was announced in accordance with royal tradition on Friday, as two members of staff dressed in black carefully placed a framed statement on the gates of Buckingham Palace.

But because his death, at 99, occurred in the age of the coronavirus in a country hit harder than most by a modern plague, the courtiers wore face masks.

Then came the mourners, crowds of the queen's subjects, who began to honor custom by placing bunches of spring daffodils and scarlet tulips at the Buckingham steps. But the palace asked the people to not come out to the royal residences or the streets, because Britain is still emerging from its third national lockdown and the government has banned public gatherings.

The death notice was removed, and police on horses and palace stewards told the people to go home.

The palace said Philip “passed away peacefully this morning at Windsor Castle,” where the queen and her husband spent much of the coronavirus pandemic, mostly out of sight.

No cause of death was given. Philip had been released from a London hospital March 16, after spending a month undergoing treatment for an infection and recovering from heart surgery. The palace said at the time that his illness was not related to the coronavirus, but it did not offer any other information. Both the queen and Philip received coronavirus vaccinations in January.

Details of “modified funeral and ceremonial arrangements” — a long-planned affair known by the code name Operation Forth Bridge — would be revealed in “due course” and respect government advice on social distancing, the palace said Friday.

But how to stage a funeral for a prince in a country that has lost 150,000 this year from the virus, whose own families were stopped from gathering?

Royal births, deaths, birthdays, anniversaries and weddings are usually semipublic affairs, with the royal family — and their emotions — on display. It is part of the performance art of maintaining a modern monarchy of kings, queens and lines of succession in the 21st century.

But Philip’s funeral will not follow tradition. There will be no lying-in-state in an abbey or ceremonial hall. No public cortege, no military processions.

British royal correspondents reported that the funeral will probably take place in a week or so at St. George’s Chapel at Windsor Castle, where Prince Harry and Meghan, the Duke and Duchess of Sussex, were wed. Philip will be interred in the family vault beneath the chapel.

Nonessential shops, outdoor pubs and hair salons are slated to open in Britain on Monday, but funeral attendance is limited to 30 people.

By comparison, at least 42 people from the extended royal family appeared on the Buckingham Palace balcony for the queen’s birthday in June 2019. Philip and Elizabeth have four children, eight grandchildren and 10 great-grandchildren.

There was much speculation about whether Harry, Philip’s grandson, would fly in from California for the funeral — a potentially first trip to Britain since Harry and Meghan aired their grievances with the royal family in an interview with Oprah Winfrey.

On Friday, the mourning was mostly virtual — on social media. “With the safety and wellbeing of the public in mind, and in accordance with government guidelines, members of the public are asked not to gather in crowds,” the palace said in a statement. “Those wishing to express their condolences are asked to do so in the safest way possible, and not to gather at Royal Residences.”

Instead, the royal family encouraged people to make charitable donations and leave messages in a book of condolences posted on its official website.

Alongside the queen, 94, Philip had been the face of the monarchy since the couple married in 1947, before the age of television and five years before his wife ascended to the throne.

Younger generations have been introduced to the prince via the hit Netflix series “The Crown,” which presents Philip as a steadfast companion to Elizabeth through triumph and the many trials that have beset the House of Windsor.

Royal biographers say the television series is more or less accurate in its broad-brush portrait of Philip, who could be a distant, demanding father and a royal snob, who sometimes bristled behind the scenes at his role of forever yielding to the decrees of his wife and queen.

But he did his duty. He supported the institution to the very end.

At the coronation of Elizabeth at Westminster Abbey in 1953, the duke knelt before the sitting queen and pledged to be her “liegeman,” or faithful servant, for life. The couple were married for 73 years. They first met when he was 17 years old and she 13 — both of them great-great-grandchildren of Queen Victoria.

News of his death saturated the press in Britain, as tributes began to pour forth.

From 10 Downing St., British Prime Minister Boris Johnson said in a statement that the prince had “helped to steer the Royal Family and the monarchy so that it remains an institution indisputably vital to the balance and happiness of our national life.”

Johnson echoed the words of Elizabeth on the couple’s golden wedding anniversary. “Her Majesty said that our country owed her husband ‘a greater debt than he would ever claim or we shall ever know’ and I am sure that estimate is correct,” he said.

President Biden joined the world leaders offering condolences to the royal family, commending Philip as “a heck of a guy.”

“Ninety-nine years old and never slowed down at all, which I admire the devil out of,” said Biden, 78.

The prince cut a dashing figure, a lean, handsome and athletic sportsman in impeccably tailored suits and military uniforms. He was a competitive cricketer and played polo into his 50s, when arthritis sidelined him. He then took up horse carriage racing instead. He was a pilot with 5,000 hours of flight time.

In recent decades, polling data showed the prince as widely respected, sometimes admired, but not tremendously popular. He was not beloved by the public — not like the queen, anyway, who remains one of the most popular figures in Britain.

Philip was famous for his quips, his zingers and his gaffes, often derogatory. To the Paraguayan despot Alfredo Stroessner in 1963, the prince said, “It’s a pleasure to be in a country that isn’t ruled by its people.” While touring China in 1986, Philip described parts of Beijing as “ghastly” and joked with a British student that he would end up “slitty eyed” if he stayed too long. During a visit to Scotland in 1995, he asked a driving instructor: “How do you keep the natives off the booze long enough to pass the test?”

Philip retired from his long career as a senior working royal in 2017, at age 96. At a reception with the queen, when a guest told him that he was sorry to hear the duke was standing down, Philip uttered one of his trademark quips: “Well, I can’t stand up much!”

At his retirement, Buckingham Palace couriers reported that the duke had performed 22,191 solo engagements, completed 637 overseas visits and given 5,493 speeches. He was colonel-in-chief of eight military regiments and patron of 20 cricket societies.

In all, he was a patron with 800 organizations during his long life, including the World Wildlife Fund, British Heart Association and the International Equestrian Federation.

Valentine Low, a royal correspondent for the Times of London, wrote that “wherever he got involved, he made his presence felt. His frankness could border on rudeness, and he got people’s hackles up on too many occasions to count. But he motivated people, he got results and, as his biographer John Parker noted, at the end of the day those who had suffered the rough edge of his tongue ‘regardless of any abuse he may have handed them . . . all turned round and said what a nice chap he was.’ ”

Adrian Higgins in Washington contributed to this report.