There are more twists to this story than in HBO’s Game of Thrones.

Heartless King Charles III pressured his dying mother, Queen Elizabeth, into publicly naming his despised mistress-wife, Camilla, the next queen, has learned.

The ruthless royal twisted the screws on his frail mom by refusing to pay her favorite son Prince Andrew‘s teen accuser a reported $13 million unless she agreed to let Camilla rule by his side as queen — and announce it to the world.

“It was a once-in-a-lifetime opportunity to keep conniving Camilla happy — and Charles seized it,” said a source.

Andrew, 62, was embroiled in a devastating New York civil court case with Virginia Giuffre, an accuser who claimed she was trafficked to the royal by the prince’s late pedophile pal Jeffrey Epstein and his now-imprisoned madam Ghislaine Maxwell.

Although Andrew denied her charge, the blueblood settled out of court — even though he didn’t have the cash to pay Virginia off.

So his big brother capitalized on the situation, spies said. “I’m told Charles knew Her Majesty was desperate to get Andrew off the hook at any cost — and he named his price to do it,” confided the source.

The future king proposed a simple quid pro quo — he wouldn’t oppose the multimillion-dollar settlement if Camilla was named queen, author Christopher Andersen, exposed the details of the bombshell deal in his new book, The King: The Life of Charles III.

“Charles was in a position where he needed the queen to endorse Camilla as they approached the Platinum Jubilee… and these things converged.”

The confrontation took place several months before the popular 96-year-old monarch died at her Balmoral retreat in Scotland on Sept. 8.

The royal family was said to be stunned by the queen’s sudden February announcement that it was her “sincere consort when Charles succeeded her.”

“They didn’t have a clue this was coming,” said the source. “Now we know the truth. Charles apparently realized the millions Her Majesty wanted to spend to bail out Andrew would effectively come out of his own inheritance — and he made his mother an offer too dangerous to ignore. If Her Majesty refused his proposal, Charles would reject Andrew’s settlement deal, plunging the royal into yet another scandal.”

Charles resorted to playing games with his mother while under tremendous pressure from Camilla, said another palace insider.

“He’d already persuaded his mother not to push him aside in favor of his son Prince William and beloved Kate. However, Camilla wasn’t content with being called Princess Consort, which Charles had promised her when they wed in 2005. Her goal has always been to be queen. But Her Majesty was reluctant — until Charles apparently pulled out his ace card.”

“During one of their marriage crises, Camilla threatened a tell-all book exposing his deepest secrets, including his kinky sex habits,” noted the courtier. “He knows he can’t allow her to go rogue now. He’d have to retract Camilla’s Queen Consort title himself.

“Making no mistake, Charles has waited for decades to become king, and he wants to cement his place in history. He won’t let anything or anyone — even Camilla — stand in his way.”