Before stepping into the role of Princess Margaret, Helena Bonham Carter asked the royal herself for some pointers — never mind that she’s been dead for 17 years.

The actress, who is playing Queen Elizabeth II’s younger sister in the upcoming third season of “The Crown” on Netflix, consulted a psychic for clues on channeling the sad princess, who died after a series of strokes in 2002 at age 71.

In a report first published in the Guardian, the British actress, who was nominated for a Best Supporting Actress Oscar for playing the queen mother in “The King’s Speech,” said she heard from the late Margaret.

“She said, ‘You’re better than the other actress’ . . . that they were thinking of [casting],” Bonham Carter told the audience at the UK’s Cheltenham Literature Festival. (The princess did not share who the competition was, but Vanessa Kirby played her in the show’s first two seasons.) “That is a classic Margaret thing to say. She was really good at complimenting you and putting you down at the same time.

“Then she said, ‘But you’re going to have to brush up and be more groomed and neater,’ ” Bonham Carter added. “Then she said: ‘Get the smoking right. I smoked in a very particular way. Remember that — this is a big note — the cigarette holder was as much a weapon for expression as it was for smoking.’ ”

“The Crown” featured Princess Margaret’s romance with Peter Townsend as a major storyline in Season 1, as Queen Elizabeth II (Claire Foy) denied her sister permission to marry her love, as he was looked down upon by the British cabinet and the Church of England because he had been divorced. The relationship between the sisters was never the same afterward. Oscar winner Olivia Colman will be playing Queen Elizabeth II in the new episodes, being released Nov. 17.