Charles joked about who Harry's dad was, he has claimed.

The King joked about who Harry’s “real father” was after meeting a mentally ill man who claimed he was the real Prince of Wales, Harry said in his new explosive memoir Spare.

Copies of the book were released five days ahead of the official release date in Spain, uncovering details of the prince’s experience growing up in the royal family.

Harry said his father “liked to tell anecdotes” and that “one of his best” was from when he visited a mental asylum.

Recounting the story, the Duke of Sussex said Charles wagged his finger at the patient claiming to be him and said “let’s see, you can’t be the Prince of Wales, I am the Prince of Wales” but the man responded “with the same gesture”.

Diana and James HewittDiana and James Hewitt. Picture: Shutterstock

Harry wrote that Charles ended a lot of his anecdotes with “philosophical flash”, this time contemplating whether anyone could be sure they were not themselves “living in a fantasy”.

Charles then joked: “Who knows if I’m even your real father? Perhaps your father really is in Broadmoor, my dear son!”

Harry claimed the joke was “in poor taste” considering rumours circulating that his real father was James Hewitt – Princess Diana’s former lover.

Charles when he was youngerCharles when he was younger. Picture: Alamy

Mr Hewitt had a five-year affair with Diana between 1986 and 1991.

The former Princess of Wales confirmed the relationship during the infamous Martin Bashir interview.

Addressing the rumours, Harry said his mother “hadn’t met Major Hewitt until long after I was born” but it did not stop speculation as he resembled the army officer.

He added that if Charles thought anything about Mr Hewitt he “kept it to himself”.

The extract was leaked from forthcoming memoir SpareThe extract was leaked from forthcoming memoir Spare. Picture: Penguin

In the tell-all memoir, Harry also revealed that he had taken cocaine when he was 17-years-old, admitting: “It didn’t make me feel especially happy”.

“Of course I had been taking cocaine at that time,” he said.

“At someone’s house, during a hunting weekend, I was offered a line, and since then I had consumed some more.”

The revelations also included that Harry and William “begged” Charles not to marry Camilla fearing she would become their “wicked stepmother” and that William “attacked” Harry, knocking him to the floor in a row about Meghan.