Prince William “wants the stables cleaned” when it comes to his controversial uncle, the former Prince Andrew, a royal biographer alleges.

Andrew Lownie, who wrote “Entitled: The Rise and Fall of the House of York,” claims the former royal is concerned about his precarious position in the family.

“He’s worried about what’s going to happen,” Lownie told Page Six in a recent exclusive interview. “He’s going to be no longer protected. William is going to deal with him.”

Prince William “wants the stables cleared” when it comes to his Uncle Andrew, claims a royal author. via REUTERS

The former Prince lost his title earlier this year. AP

Lownie says that the Prince of Wales “wants to deal” with his errant uncle before cancer-stricken King Charles dies.

“He wants the stables cleaned … the window dressing is that Andrew will leave by the spring, and he’s a good boy, and he’s done what he’s been told,” he details.

However, Lownie notes that Andrew, 65, is rarely “a good boy” and predicts that he will “go kicking and screaming,” demanding many guarantees, including a “pretty big house, extensive staff, a gardener, a driver, a housekeeper [and] a cook.”

Earlier this year, the Queen’s second son — and reputed favorite — was stripped of his “prince” title and forcibly moved out of his longtime residence, Royal Lodge home, amid his ties to the late convicted pedophile Jeffrey Epstein.

Andrew, seen here with Melania Trump, lost his title amid his ties with the late pedophile Jeffrey Epstein. Getty Images

Sex-trafficking victim Virginia Giuffre claims she was forced to sleep with the royal. DOJ

He is now known as Andrew Mountbatten-Windsor. His ex-wife, Sarah Ferguson, also lost her title as the Duchess of York.

Virginia Guiffre, an Epstein sex trafficking victim, long claimed that she had been forced to sleep with Andrew when she was just 17. Andrew, who denied the accusation, paid Guiffre, who took her own life in April at age 41, a multi-million dollar settlement in 2022.

A newly released 2021 email from the Epstein files reveals that Andrew allegedly asked his pal, Epstein accomplice Ghislaine Maxwell, if she had “found me some new inappropriate friends.”

Andrew’s ex-wife, Sarah Ferguson, also lost her title. WireImage

Lownie claims that Ferguson has cut bait from her ex. Getty Images

Maxwell, 63, is currently serving 20 years for sex trafficking, although she was inexplicably moved to a cushier prison.

Lownie, who is working on the paperback edition of his book, promises there will be lots of new juicy material because so many people have come forward.

“I would say almost every day, two or three people come to me with stories of encounters with [Andrew],” Lownie explained. “Former schoolmates, former Navy colleagues, former members of staff, former diplomats who weren’t prepared to talk to me.

“I’ve had some people from the intelligence agencies who were frustrated, who were reporting things that were just being ignored.”

The author says that Ferguson plans on reinventing herself. Getty Images

Lownie also promises damning new details about Andrew in the paperback edition of his book. Bav Media / SplashNews.com

Those tales reportedly include “taking prostitutes to hotels in Hong Kong, an extraordinary tsunami of stuff.”

Lownie says he has heard from former protection officers who were sexually harassed by the former Duke, and described it as “extraordinarily inappropriate behavior,” like being poked for not driving to his specifications and unwanted hugs from behind.

The author of “Traitor King” also says that Andrew’s famously close relationship with his ex-wife, Sarah Ferguson, is kaput.

Want more celebrity and pop culture news?

Start your day with Page Six Daily.

Thanks for signing up!

Lownie says he has been told that the disgraced royal ordered sex workers to his hotel room. Tom Maddick / SWNS

The book is a biography of both Andrew and Ferguson. HarperCollins

“She’s cut loose,” he opines. “She sees he’s toxic. She’s going to rebrand herself. He’s no longer a Prince … she’s no longer got a calling card, and so she’s going to reinvent herself.”

Lownie describes the former Weight Watchers shill as “the Houdini of the royal family,” noting, “She will always escape somehow and come back.”

Meanwhile, Lownie says that the loss of Andrew’s title must be devastating for him.

“That was the really important thing,” he noted. “He used to describe himself as, ‘I’m a Prince first, a naval officer second, and a husband third.’ And so he can’t go on the balcony, he can’t get all the attention.”

If you or someone you know is affected by any of the issues raised in this story, call the Sexual Assault Hotline at 1-800-330-0226.