Sofia Vergara has been granted a temporary restraining order against a man who allegedly believes he has a “romantic and familial relationship with her and her son”.

The Modern Family star requested protection for herself and her son Manolo, claiming a man repeatedly trespasses near her home, including an incident in July where he allegedly hiked through the hills to bypass security and shouted that she “is mine” when confronted.

In court documents obtained by the PA news agency, Vergara also claims 34-year-old Gregory Aaron Brown mailed her a “disturbing letter” in November which stated his intent to find and be with her soon.

The 88th Academy Awards – Vanity Fair Party – Los Angeles
Sofia Vergara said the alleged stalking was ‘extremely distressing'(PA)

“He has engaged in stalking and harassment directed at me, which is seriously alarming, annoying and harassing me,” Vergara said in the documents.

“Brown’s on-going, aggressive and harassing conduct and messages are extremely distressing and are causing me constant anxiety and emotional distress.”

The 51-year-old is said to be in fear for her personal safety and for those around her as the alleged conduct has become “extremely frightening”.

The documents described him as a “mentally unstable stalker” with a “long-time fixation” on Vergara.

“He delusionally believes he personally knows her, and has a romantic and familial relationship with her and her son, which he does not,” the documents said.

“At times Brown has stated Petitioner (Vergara) ‘belongs’ to him.

“Brown is engaged in compulsive stalking of Petitioner (Vergara), and poses credible threat of violence and imminent danger to her.”

The documents state that Vergara does not know Brown and alleges he has a “fixation on and obsession” with her.