During the final months of her life, Queen Elizabeth II turned to her "favorite son," the disgraced Duke of York.

Britain’s longest-serving monarch died Sept. 8 at Scotland’s Balmoral Castle at the age of 96. Before her death, the reigning monarch enjoyed robust health well into her 90s, although she used a cane in an appearance after her husband Prince Philip’s death in April 2021. 

But, months ago, she told guests at a reception, "As you can see, I can’t move." The palace, tight-lipped about details, said the queen was experiencing "episodic mobility issues."

As public appearances grew rarer, she enjoyed frequent visits from her son Prince Andrew.

KING CHARLES HAS ZERO PLANS TO INCLUDE PRINCE ANDREW IN MONARCHY’S FUTURE, ROYAL EXPERT CLAIMS: ‘TRULY OVER’

Queen Elizabeth and Prince Andrew

Vanity Fair's royal correspondent Katie Nicholl explored Queen Elizabeth II's close relationship with Prince Andrew in her book "The New Royals." Numerous sources told Nicholl they were surprised by how the late monarch approached the Duke of York's scandals. (hris Jackson/Getty Images)

"She saw Andrew very, very regularly right up until her death," Vanity Fair’s royal correspondent Katie Nicholl told Fox News Digital. "They remained incredibly close, and she was very protective of him."

Recently, the author wrote a book, "The New Royals: Queen Elizabeth's Legacy and the Future of the Crown." In it, she details the legacy that the queen left behind and what it really means for those standing in the House of Windsor. Nicholl noted it was "impossible" to write her latest book without exploring the troubles that have rocked Buckingham Palace.

"Well, of course, I covered the scandal involving Prince Andrew," she explained. "I really wanted to get to the bottom of what the queen really felt about [whom many believed was] her favorite son."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Andrew, 62, was entangled in the sordid tale of sex offender Jeffrey Epstein, an American businessman who had been a friend. Andrew denied accusations that he had sex with one of the women who said she was trafficked by Epstein.

"My understanding was that she did quiz him," said Nicholl. "She asked him about the Epstein allegations and about his relationship with Virginia Giuffre. They had a very honest conversation, and Andrew assured her that he was innocent of those allegations. She believed him. This was her son after all. And she didn’t just believe him. She stood by him."

Prince Andrew, Duke of York presents his mother Queen Elizabeth II with the Ascot Gold Cup

According to numerous palace insiders, Prince Andrew was "the queen's favorite son." (Max Mumby/Indigo/Getty Images)

"It was the queen who allowed Andrew to walk her up to her seat at the service of thanksgiving for the Duke of Edinburgh [earlier this year] which, you know, was deemed to be quite controversial," Nicholl pointed out.

According to Nicholl’s book, a close family friend told her Andrew gave his mother his word "on more than one occasion that he was innocent." But those close to the queen felt she should have been "more ruthless."

JEFFREY EPSTEIN ‘TOLD PEOPLE’ THAT PRINCE ANDREW WAS ‘A USEFUL IDIOT,’ BOOK CLAIMS

"There was a question being asked: Had some of her sharpness softened?" an insider who worked closely with the monarch told Nicholl.

The queen’s lenience on "Randy Andy" raised plenty of eyebrows behind palace doors.

Queen Elizabeth II and Prince Andrew, Duke of York arrive for the Royal Garden Party

Katie Nicholl claimed Queen Elizabeth II saw Prince Andrew regularly "right up until her death." (Ben Stansall/WPA Pool/Getty Images)

"Prince Andrew has a horrible reputation among palace staff and government officials," royal expert Shannon Felton Spence told Fox News Digital. "Long and established. Entitled and self-important. Which is the opposite of the other family members' reputations, who are known to go above and beyond to not be entitled and self-important. Particularly the King and Queen Consort, as well as the Prince and Princess of Wales. Their staffs are all very loyal to them.

"I am told that when a foreign office post would be notified of a Prince Andrew visit as U.K. Special Trade Envoy it was very much like, ‘Ugh, here we go,’" she shared. "I’ve never met anyone who enjoyed working with him in any capacity. He is no longer a working member of the royal family so any staff Prince Andrew currently has would be to manage private affairs only and would not be funded through the family."

PRINCE ANDREW'S EVERY MOVE WILL BE SCRUTINIZED AS HE REMAINS THORN IN FAMILY'S SIDE: ROYAL EXPERT

Andrew is now eighth in line to the throne after his mother's death. However, royal experts have insisted his brother, King Charles III, has zero plans to include him in the future of the monarchy.

Andrew was stripped of his honorary military roles in January amid the furor surrounding a lawsuit. The case alleged that Andrew had had sex with a 17-year-old supplied to him by Epstein. The queen also removed his honorary leadership of various charities and known patronages, and she barred him from using the title "His Royal Highness" in official settings.

Queen Elizabeth Prince Andrew service of thanksgiving

Queen Elizabeth II was escorted by Prince Andrew, Duke of York, for the service of thanksgiving honoring the Duke of Edinburgh March 29, 2022, in London. (Richard Pohle/WPA Pool/Getty Images)

Virginia Roberts Giuffre has said that Epstein forced her to have sex with Andrew in 2001 when she was 17. She alleged that Epstein had flown her around the world on private planes to have sex with powerful men and that she had had sexual encounters with Andrew in London, New York and the U.S. Virgin Islands. Epstein died in jail in August 2019 while awaiting trial on federal sex trafficking and conspiracy charges. He was 66.

In 2019, Andrew sat down for what ended up being a disastrous interview to address the allegations. After facing scathing criticism, the duke announced he was stepping back from public life.

VIDEO SHOWS PRINCE ANDREW HECKLER GETTING ARRESTED AS CROWD CHANTS ‘GOD SAVE THE KING’

In March of this year, a U.S. judge dismissed the sex abuse lawsuit against Andrew, three weeks after attorneys for Giuffre had reached a deal. The prince was to make a substantial donation to his accuser’s charity and declare that he never meant to malign her character.

In a letter to the judge from Giuffre's attorney David Boies, a statement was included that said, in part, "Prince Andrew intends to make a substantial donation to Ms. Giuffre’s charity in support of victims’ rights. Prince Andrew has never intended to malign Ms. Giuffre’s character, and he accepts that she has suffered both as an established victim of abuse and as a result of unfair public attacks."

Prince Andrew Virginia Giuffre

Virginia Giuffre alleged she was abused by the Duke of York when she was underage. The British prince denied the allegations. (Getty Images)

According to the statement, the duke acknowledged that Epstein had trafficked "countless young girls" over many years. 

He "regrets his association with Epstein and commends the bravery of Ms. Giuffre and other survivors in standing up for themselves and others."

Earlier this month, Andrew's scandal created headlines once more after he appeared at a procession for his mother in Edinburgh. As he walked behind the queen's casket with his siblings, a protestor yelled, "Andrew, you’re a sick old man."

CLICK HERE TO GET THE FOX NEWS APP

Police said the 22-year-old who heckled the prince was arrested "in connection with a breach of the peace."

Andrew has denied the allegations.

The Associated Press contributed to this report.