Exclusive

TMZ Composite

Sofia Vergara[1], Joe Manganiello[2] and her son are seeking court-ordered protection from a man their friend claims is stalking them, and is potentially dangerous

Producer Luis Balaguer filed docs seeking a restraining order against a man named Rengifo Randazzo, who he claims is a mentally unstable stalker who was recently arrested for trespassing in Sofia's gated community.

Luis says the guy has a fixation on him, Sofia, her husband and her son, Manolo, and has repeatedly harassed them. According to the docs, Randazzo admitted he was stalking them when he got busted for trespassing.

Luis says Sofia and co. fear for their lives because the alleged stalker has a history of domestic violence arrests and others have gotten restraining orders against him.

They want a judge to force Randazzo to stay at least 100 yards away from them at all times.

Read more from our friends at TMZ