LONDON — Prince Harry was back at work Thursday, making his first public appearance since the big reveal that he and his wife, Meghan, are stepping back from front-line royal service and fleeing part time to Canada.

The event, held on the green lawns and in the vaulted halls of Buckingham Palace, involved Harry drawing first-round matchups for the 2021 Rugby League World Cup — and had been inked in his diary for some time.

A reporter shouted, “How are the discussions going on your future?”

The 35-year-old prince just smiled.

Discussions are ongoing.

Harry’s royal “engagement,” as these duties are called, had a larger significance. It may be one of the prince’s last turns on the dance floor as a “senior” working royal before he and his wife begin a “period of transition” in which they will split their time between Britain and Canada.

Meghan is already in the Vancouver, B.C., area with the couple’s 8-month-old son, Archie, and the family’s dogs.

Although the dizzying events of the past week have caught many off guard — including, it seemed, Queen Elizabeth II, Harry’s grandmother — royal-watchers say there have long been signs of Harry’s unease with the job.

Harry’s problem is not unique. After all, he is a spare.

In royal houses such as the Windsors’, there are “heirs and spares.” It has been this way for as long as kings and queens have had sons and daughters.

Jonathan Spangler, a historian at Manchester Metropolitan University, said that when hereditary systems were established, having a backup plan — and a backup to the backup plan — was critical.

In the pre-modern world, he said, “elder sons did die, so you [would] have to make sure the second son was educated, confident and ready.”

Henry VIII — a Tudor king well known for his six wives — was once a spare. He became heir when his older brother, Arthur, died of an illness at age 15. Similarly, Charles I was a spare but became heir after his brother, Henry, died of typhoid fever at 18.

In Britain today, Prince Charles, 71, is the direct heir and would assume the throne if his mother dies or becomes too infirm to rule. After Charles comes Harry’s elder brother, Prince William, who is second in line, followed by his three children. Harry is now sixth. With modern medicine — and the old ways of fratricide relegated to the history books — he will always be a spare.

This is a game of thrones played for all of one’s life, and Harry has expressed unease with the burden.

Many have pointed to a 2017 Newsweek article. “Is there any one of the royal family who wants to be king or queen? I don’t think so, but we will carry out our duties at the right time,” Harry said then.

Journalist Angela Levin, who wrote that article and shadowed Harry for a year, said he told her that he had toyed with the idea of calling it quits but stayed on primarily to help the queen. Levin recalled him saying, “There was a time I felt I wanted out . . . but then I decided to stay in and work out a role for myself.”

Being a spare comes with luxurious perks — a multimillion-dollar “cottage” near Windsor Castle and a tax-free life. But it offers unique challenges — a life spent cutting ribbons, posing for photos and attending hospital openings, alongside relentless, sometimes cruel, media interest and an ever-dwindling chance of getting the top job.

Because as time marches on, the spares become spares to the spares.

Robert Lacey, a royal historian, said that “the psychology of Harry, just an element of it, is the same problem that Princess Margaret [the queen’s younger sister] and Andrew [the queen’s second son] had — as spares, who start their life as number two in the hierarchy, they are next in line and watch their destiny in life to be pushed down the list as number one marries and has children and grandchildren.”

Margaret was for years second in line to the throne. By the time of her death in 2002, she had slid to 11th in line of succession. Andrew was No. 2 when he was born and is now No. 8.

Margaret and Andrew developed reputations as black sheep who tested the boundaries of what was acceptable for a member of the royal family. In November, Andrew was forced to quit his public duties, amid a scandal over his friendship with sex offender Jeffrey Epstein.

Harry’s trespasses have been less damaging for him. He made news for naked partying and for once dressing up as a Nazi at a costume party. But he has remained endeared to the British public — and the queen.

Ingrid Seward, editor of Majesty magazine, said the queen has a special affection for her children and grandchildren who will never ascend.

“The queen is quite good to the spares,” Seward said. “She feels it.” Probably, first of all, from seeing the disappointments and struggles of her sister, Margaret.

Penny Junor, a British royal historian, said Elizabeth has made clear that there are no co-queens, but at the same time that there are good, worthy, solid roles for the extras to play.

Charles has signaled over the years that he is in favor of a slimmed-down monarchy, focusing on the main blood line. That would push the spares even further toward the sidelines.

Much was made during the 2012 Diamond Jubilee, when the queen appeared on the balcony at Buckingham Palace with just Charles, Camilla, William, Catherine and Harry. And the queen marked a new decade this month with an official photo that included only herself along with Princes Charles, William and George — the next three in line.

There is no sense that Harry and Meghan are retiring from public life. Depending on social media interest in their celebrity and their story, the public could want more.

On Wednesday, Harry posted a video on the Sussexroyal Instagram account to announce that the 2022 Invictus Games — a sporting event for wounded veterans that he founded — will take place in Düsseldorf, Germany. Earlier this week, Meghan made an appearance at a women’s shelter in Vancouver.

Harry and Meghan have said they want to continue their current patronages or affiliations with charities.

But the royal couple have said that they want to do things differently.

They have hinted at a “new charitable entity.” They say they want to achieve “financial independence” and live in two countries. There are still many details that need sorting, including about their titles and finances.

Spangler, the historian, said the role of spares has evolved over time. “A lot of this story gets started with unruly Hanoverians,” Spangler said.

In the 18th century, the playboy younger brothers of George III were pilloried “for being a useless drain on society.” That prompted new legislation for how younger royals should behave. For instance, after the Royal Marriages Act of 1772, the monarch had to approve the marriages of all members of the British royal family. Since 2013, only the first six people in the line of succession have needed the monarch’s approval. Before Harry and Meghan’s nuptials, the queen had to formally give her consent.

Spangler said that beginning in the 19th century, it became popular to dispatch spares to the Royal Navy. In more recent decades, they pursued charitable work. Harry did two tours of Afghanistan and is a patron of 16 charities or organizations.

Harry and Meghan are carving out a new path for themselves but also perhaps for future spares. If they make a success of what some think could be a half-in, half-out royal life, it is possible that one day William’s youngest children, Princess Charlotte and Prince Louis, may just thank them.