John Cusack has been haunted for years by emails, letters, tweets, and voice mails from a woman who claims angels told her she and Cusack are supposed to be together -- the very same woman who was arrested at his home yesterday.
As TMZ first reported ... Cusack requested, and was granted, a temporary restraining order against Elizabeth Pahlke, on August 30 ... which requires her to stay 100 yards away from the actor and his security guard.
In his filing, Cusack says Pahlke has been blasting him with every form of communication under the sun for the past 3 years -- but the last straw came Aug. 29 when she left a letter at his house, and then waited for him outside.
Cusack says when Pahlke followed him as he left the house ... he called cops, and she was arrested and placed on a 5150 hold.
In the docs, Cusack says Pahlke "claims that the angels told her that we were together in a previous life, and that she needs to be with me now in order for me to remember how special she was to me."
Law enforcement sources tell us Pahlke was informed of the TRO yesterday -- and shortly afterward went straight to Cusack's house.
As we previously reported ... she was arrested for felony stalking and burglary. The L.A. County Sheriff's Department was at the house today ... dusting for fingerprints.
Cusack's TRO is in effect at least until Sep. 23 when a hearing is scheduled to determine if it will be extended.