Prince William played a crucial role in keeping Princess Diana sane while the late royal was dealing with her difficult relationship with Prince Charles. The Princess of Wales learned how to become a devoted mother to her eldest child as a means to cope.

According to royal author Sally Bedell Smith, the Prince and Princess of Wales experienced friction in their relationship after the future king realized that the public was more interested in Princess Diana. The attention from royal fans made Princess Diana upset, especially since it was disturbing her ex-husband.

Princess Diana dubbed the difficult period in her marriage as the “dark age.” But despite their issues, the royal couple found happiness in taking care of their son, Prince William. Prince Charles and Princess Diana both vowed to be more hands-on compared to their own parents.

The late royal and the future king still hired nannies for their boys, but this didn’t stop them from being involved in their kids’ lives. “Diana took her mothering seriously. Racing down the hallway to the nursery when she heard her son’s cries in the night,” Smith said.

Prince Charles was also eager to spend quality time with his son because this was something that he didn’t experience from his dad, Prince Philip. Growing up, Prince Charles was distant from the Duke of Edinburgh because they were also very different from each other.

During a previous interview, Prince Philip told royal biographer Gyles Brandreth that he’s a pragmatist, while his eldest son is a romantic. As such, the two male royals tend to see things differently, and Prince Charles once labeled his relationship with his dad as cold.

Meanwhile, Princess Diana’s close relationship with her sons was something they imbibed and practiced with their respective families. Prince William has a wonderful relationship with his wife, Kate Middleton, and their three children, Prince George, Princess Charlotte and Prince Louis. Whenever the Cambridges are out in public, it’s evident that Prince William and Kate are both very hands-on with their kids.

Prince Harry is also very close to and protective of his wife, Meghan Markle, and their son, Archie. The Duke of Sussex also wants to ensure that Archie will grow up as a private citizen.

Princess Diana, Prince Harry, Prince William and Prince Charles Prince Harry, Prince William and Prince Charles at a parade in the Mall, London, during V.J. Day commemorations, August 1994. Terry Fincher/Getty Images