Prince Harry and Meghan Markle
Margot Robbie, Cara Delevingne prank-called Prince Harry once. Pictured: Prince Harry and Meghan Markle during an official photocall to announce their engagement at The Sunken Gardens at Kensington Palace on Nov. 27, 2017 in London. Getty Images/Chris Jackson

Margot Robbie prank-called Prince Harry once.

Robbie confessed that she tried to prank-call Meghan Markle's fiancé when her friend, Cara Delevingne, gave her the royal's phone number when they were filming "Suicide Squad" in 2016. "Cara knows Harry and while we were filming 'Suicide Squad' she was like, 'Let's prank-call him," Robbie told The Sun (via Daily Mail).

"I said, 'We can't prank-call ­royalty' but anyway we did — and he was so cool with it," the "I, Tonya" star continued. "Prince Harry is so nice - England literally has the coolest royalty in the world."

In January, Robbie appeared on "The Kyle & Jackie O Show," where co-host Jackie "O" Henderson asked her if she and Prince Harry are friends. "I wouldn't say we're close," Robbie said about her friendship with Prince Harry. "We see each other every so often at a party here or there, but not close friends."

The "Wolf of Wall Street" star was also asked if she would be invited to Prince Harry and Markle's royal wedding. Prince Harry and Markle are set to tie the knot on May 19 at St. George Chapel in Winsor Castle.

However, Robbie believes that they are not close enough for her to receive an invite to the most awaited event of the year. "No, definitely not that close!" Robbie said.

In 2016, Robbie and Prince Harry met through Delevingne. "Well, he's friends with Cara [Delevingne]," the "Legend of Tarzan" actress told E! News. "They've known each other for years, and we met through friends."

Prince Harry and Robbie first met at a house-warming party for Suki Waterhouse. However, the actress did not recognize the royal prince when she ran into him. She admitted that she confused Markle's fiancé for Ed Sheeran.

"He got really offended," Robbie laughed as she recalled the incident. But in her defense, she explained, "He wasn't wearing a crown though! Like, I don't know it's a prince!"

Robbie had Prince Harry's number, but she never told her family about it. She also admitted to Extra that the Duke is quick on text unlike her.

"He's pretty quick on text actually," Margot said. "Unlike me—I write back four days later, weeks later sometimes."