LONDON — Prince William and Kate Middleton will exchange vows Friday in a ceremony expected to be watched by almost a third of the planet. But if the story that day will be of a prince and his bride, another will also be playing out behind the scenes: a tale of two kings.

William’s popularity is helping reinvent the monarchy here, with his marriage to a glamorous bride cementing the easy-mannered 28-year-old’s image as the perfect 21st-century king. Yet even as he becomes the single greatest key to ensuring the future of the House of Windsor, many here say William is in danger of overshadowing his far less popular father, Prince Charles, the next in line to the throne.

At stake, royal watchers say, is the public standing of the British monarchy, which during the reign of Queen Elizabeth II has enjoyed virtually unwavering support. Yet despite a relatively successful campaign to improve Charles’s image, an Ipsos Mori poll last week showed a greater percentage calling for William to leapfrog Charles to the throne than at any point since the 1997 death of Charles’s ex-wife and William’s mother, Diana, Princess of Wales. Forty-six percent of respondents now say Charles should step aside.

Britons are likely to get Charles as king, whether they like it or not. The succession of Charles, who as of last week has spent more time waiting for the crown than any other heir in British history, is enshrined by law and unlikely to be changed. Although Elizabeth may be on Facebook and the Friday wedding may be wired for YouTube, royal experts say the monarchy’s hereditary tradition still stands above the whims of public opinion.

But the popularity gap between father and son is nevertheless hanging over the coming reign of Charles III — a man poised to rank among the most controversial monarchs of recent times.

Charles faces a quandary over whether his beloved should receive the title “queen” — in his case, Camilla, Britain’s most famous home wrecker during Charles’s marriage to Diana and now his second wife. At the same time, William will be taking up a new life with Middleton, an elegant young woman of non-noble blood whose skyrocketing public popularity, royal watchers say, is greatly enhancing William’s starlight.

“In an age of celebrity, you can’t deny that glamour counts, and here we have this youthful, popular man in the wings with his new and attractive wife,” said Roy Greenslade, a British media commentator. “So what you’ve got now is the factor of people saying, ‘Gosh, wouldn’t it be nice to have him instead?’ ”

It illustrates the challenges ahead for the idiosyncratic Charles, the 62-year-old scion of the House of Windsor who once said that it was important to talk to plants and whose mumbling, upper-crust accent has long been a British comedian’s best friend.

Connecting with public

Charles spent the past decade and a half clawing back for respect lost during the “Battle of the Waleses” with Diana. He is viewed by a good many as having rehabilitated himself as a positive father figure and has won kudos for championing causes such as environmentalism before they were fashionable. Even Camilla is seen in a more positive light, viewed as a supportive wife and a somewhat hip stepmother.

Nevertheless, Charles has failed to do something that William has: win the people’s genuine affection and earn their faith as a future monarch. In a November poll by YouGov, 38 percent of those asked said Charles would “make a good king,” compared with 69 percent who said William would.

That, royal watchers fear, suggests Charles will face problems connecting with the people as king, potentially putting at risk the consistently high public support for the monarchy — which, under the widely respected Elizabeth, still has the backing of 75 percent of the nation, a figure that has fluctuated only slightly over the past three decades, according to Ipsos Mori.

For Charles, it will put any missteps as monarch in high relief. As a highly opinionated Prince of Wales, Charles has waged a private war against modern architecture, dooming an avant-garde project in London’s chic Chelsea neighborhood by dropping a line to friends in the Qatari royal family bankrolling the development. But British monarchs cannot meddle in such affairs and are expected to constantly toe a neutral line.

“You cannot have an activist king. It will not do,” said Ingrid Seward, editor in chief of Majesty magazine. “Once he is king, he will have to shut up. And he knows it.”

And yet, the prospect of an exceedingly popular King William V in the wings may be exactly what the House of Windsor needs to get through Charles’s reign.

Like his father, William was born a celebrity, but unlike Charles, William inherited some of his mother’s popularity. He became closer to the public, royal watchers say, as the national grief over Diana’s death was blunted by the fact that a son in her image would one day be king. Right down to his accent, described by some as a sort of aristocratic cockney, William is seen as accessible to the masses in ways Charles is not.

That is particularly true in Commonwealth countries such as Australia and Canada, where the preference for William over Charles is even more pronounced. In some of those nations, calls are growing to change the laws of succession.

“This matters to the monarchy a great deal, and it is an open question as to whether all the commonwealth countries would welcome King Charles III,” said Robert Lacey, a noted royal biographer. “But knowing that if they hang on they will get King William V is the biggest factor working in the favor of the monarchy.”

Young Britannia

In Britain, William’s marriage appears to be rekindling a measure of excitement over the royal family not seen in years. Despite opinion polls showing that one in three here do not care about the wedding, London alone will be home to more than 2,000 street parties to celebrate the event. More importantly, William — with a little help from Kate — appears to be cultivating a relationship with some of the youngest Britons, who never knew Diana, in a manner that Charles never could.

Take, for instance, Grace Smith, a 10-year-old who was sitting in her family’s garage on a recent afternoon in York, a city about 200 miles north of London, behind a homemade sign reading “Royal HQ, No Adults Allowed.”

Grace professed little interest in the royal family “pre-Will and Kate.” But since the couple’s November engagement, she and her two best friends have gone door-to-door enlisting guests and raising cash for a neighborhood street party Friday — even getting the local butcher to bake a traditional pork pie in the shape of a wedding cake.

Ask her about Prince Charles, and she wrinkles her nose. “Eww,” Grace said.

But ask her about Prince William, and she beams. “He is going to be king one day, and unless he turns mean and bans Christmas or something, I will be so happy when he does!” she giggled.

Special correspondent Karla Adam contributed to this report.