Olivia Wilde has been granted a three-year restraining order against a man who claimed he was her lover.

Olivia Wilde

Olivia Wilde

The 37-year-old actress sought a protective order against Eric Nathanial Fuhs last month and a judge has now ruled the temporary measures that were imposed then must stay in place for three years, TMZ reports.

According to TMZ, Olivia - who is now dating Harry Styles - applied for the order after she claimed to have security footage showing him arriving at her home on multiple occasions to leave notes for her and former partner Jason Sudeikis, with Fuhs falsely claiming he was dating the 'Tron: Legacy' actor.

One note was 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 continued: "This continued almost every day... until January, when Harry Styles got credit for what I was doing."

The documents also revealed that in October, the man interrupted a private Zoom call Olivia was on to allegedly harass 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", but sources claimed that is no longer the case.

The restraining order also bans Fuhs from going anywhere near Jason and the pair's two children, Otis, six and Daisy, four.