Big Australia / Fame Flynet 1 / 15
Big Australia / Fame Flynet 1 / 15

LOS ANGELES (AP) — Alyson Hannigan has obtained a temporary restraining order against a man whom she claims has repeatedly threatened her and her family.

RELATED: Alyson Hannigan shares first photo of newborn daughter

The "How I Met Your Mother" star obtained the order Wednesday. It requires John Hobbs to stay 100 yards away and stop posting about her online.

Hannigan's court filings state that the 43-year-old resident of Nashua, N.H., was recently released from a mental hospital.

RELATED: Alyson Hannigan talks pregnancy and nannies

The filing says Hobbs has threatened in online posts to kill the actress and harm her family. He admitted to police in New Hampshire that he wanted to travel to California to meet the actress.

RELATED: Alec Baldwin's alleged stalker claims to have seen Baldwin naked

The order covers Hannigan, her husband and their two children, ages 1 and 3.

A phone number registered to Hobbs has been disconnected.