Margot Robbie thought she might be arrested after the actress slapped Leonardo DiCaprio while auditioning for "The Wolf of Wall Street."

The impromptu moment came while the two were supposed to be reading a kissing scene. However, Robbie decided another move would work better for the script. The last line from DiCaprio was, "Come over here and kiss me."

"And in my head I was like, ‘I could totally kiss Leonardo DiCaprio. That would be awesome,’" she recalled thinking during an episode of the "Talking Pictures" podcast. "I can’t wait to tell all of my friends this."

"And then I was like… nah. And just walloped him in the face," Robbie said.

‘BARBIE’ STAR RYAN GOSLING CALLS OUT MARGOT ROBBIE OSCAR SNUB

Margot Robbie in a scene from Wolf of Wall Street

Margot Robbie improvised during her audition for "Wolf of Wall Street." (Paramount Pictures, Photo 12/Alamy Stock Photo)

"I was like, ‘You’re going to get arrested. I’m pretty sure that’s assault, battery. Not only will you never work again, but actually you will go to jail for this, you idiot. And also, why did you have to do it so hard? You could have done it lighter.'"

— Margot Robbie

"And it was dead silence for what felt like an eternity but was probably three seconds," recounted the actress, who was 22 years old at the time. "And then they just burst out laughing. Leo and Marty were laughing so hard, they said, ‘That was great.’"

Afterward, Robbie worried she would get "arrested" and ruin her career over the off-script move.

"I was like, ‘You’re going to get arrested, I’m pretty sure that’s assault, battery,'" she thought at the time. "Not only will you never work again, but actually you will go to jail for this, you idiot. And also, why did you have to do it so hard? You could have done it lighter."

Margot Robbie and Leonardo DiCaprio attend the premiere of Wolf of Wall Street

Margot Robbie says she was afraid she'd get arrested after slapping Leonardo DiCaprio during her final audition. (Getty Images)

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

Robbie's role as Naomi Lapaglia in "Wolf of Wall Street," alongside DiCaprio, Jonah Hill and Matthew McConaughey, thrust the young star straight into the spotlight. The film was based on the real-life story of Jordan Belfort, a former stockbroker who committed financial crimes, including stock market manipulation and fraud.

The "Barbie" actress wasn't prepared for the newfound level of fame the role brought her.

Margot Robbie

Margot Robbie wasn't comfortable with her level of fame after her breakout role in "Wolf of Wall Street." (Jim Spellman/WireImage)

"Something was happening in those early stages, and it was all pretty awful, and I remember saying to my mom, ‘I don’t think I want to do this,'" she told Vanity Fair in 2022.

"And she just looked at me, completely straight-faced, and was like, ‘Darling, I think it’s too late not to.’ That’s when I realized the only way was forward."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Margot Robbie attends a premiere

Margot Robbie has also starred in "I, Tonya," "Suicide Squad" and "Once Upon a Time in Hollywood." (Gareth Cattermole/Getty Images for Walt Disney Studios Motion Pictures UK)

These days, Robbie is much more comfortable navigating her stardom.

"I know how to go through airports, and now I know who’s trying to f--- me over in what ways," Robbie explained to the outlet.

After "The Wolf of Wall Street," the actress landed roles in huge films including "I, Tonya," "Suicide Squad" and "Once Upon a Time in Hollywood."

Most recently, the 34-year-old starred in the box office hit "Barbie" alongside Ryan Gosling.

Ryan Gosling and Margot Robbie at "Barbie" premiere

Ryan Gosling and Margot Robbie starred in "Barbie." (Wiktor Szymanowicz/Anadolu Agency via Getty Images)

The film, which was the biggest opener of 2023, grossed $1.44 billion, according to Deadline

CLICK HERE TO GET THE FOX NEWS APP