A judge Wednesday granted Alyson Hannigan a temporary restraining order from a man who she claims has repeatedly threatened her and her family in online postings.
The order requires 43-year-old New Hampshire resident John Hobbs to stay away from the "How I Met Your Mother" actress and her family, and it orders him to stop posting messages about her online.
Hannigan states in her petition that in the past two months Hobbs has "posted a barrage of threatening messages directed at me and my family on various websites."
The actress wrote that she has never met Hobbs, but his messages have suggested he will rape her and take her to the "after-life." Hobbs recently was released from a mental hospital, according to the court filings.
"I am in severe fear for my safety and the safety of my family," she wrote.
Police in Hobbs' hometown of Nashua, N.H., contacted him and he did acknowledge wanting to visit Hannigan, 38, in California.
"Hobbs seemed to be living in an alternate reality," the officer wrote after interviewing him and reviewing his Facebook account.
A phone number registered to Hobbs has been disconnected.
A hearing to extend the restraining order for three years is scheduled for March 6 in Los Angeles. The order also covers Hannigan's husband, Alexis Denisof, and their children, ages 1 and 3.
Hannigan stars in CBS' "How I Met Your Mother," which airs Mondays at 8 p.m. ET.