Olivia Wilde and Jason Sudeikis have been granted a temporary restraining order from an alleged stalker.

Olivia Wilde and Jason Sudeikis

Olivia Wilde and Jason Sudeikis

The 37-year-old star and 45-year-old actor - who split last year after a long-term relationship - have been granted protection from a man named Eric Nathanial Fuhs, whom Olivia alleges has been harassing her for months.

According to legal documents obtained by TMZ, Olivia claims that the man keeps showing up at her home, imagining he's her boyfriend and venting his frustration over her new romance with Harry Styles.

The judge's ruling means that Fuhs must stay 100 yards away from Olivia, Jason and the pair's children - Otis, six and Daisy, four.

Olivia alleges that she has security footage that shows the man at her home on a number of occasions leaving notes falsely claiming that the pair are in a relationship.

One note is addressed to Jason, saying "how she [Olivia] was unhappy in her relationship, and how she wanted to start a new relationship with me".

The note continues: "This continued almost every day... until January, when Harry Styles got credit for what I was doing."

The documents also revealed that the man interrupted a private Zoom call Olivia was on back in October and harassed her.

The 'Meadowland' star is reportedly scared that the man has been able to find her home as she has never shared her address and was concerned over a particularly ominous note.

It read: "I, as of March 19, 2021, am now struggling to stay sane whilst being hidden."

Although she has since started a relationship with the former One Direction singer, Olivia explains in the documents that she "lives with Mr. Sudeikis and our two children".