Margaret Mary Ray, 46, the woman who went to prison for repeatedly stalking late-night television talk show host David Letterman, committed suicide Oct. 5 by kneeling in front of an oncoming train in Hotchkiss, Colo. She was killed instantly.

Ms. Ray spent various terms in prison, jail and mental institutions over the years for harassing Letterman and, more recently, retired astronaut Story Musgrave. She was first arrested in 1988 while driving Letterman's Porsche near the Lincoln Tunnel in New York. She identified herself as Letterman's wife and her son as David Jr. when she was unable to pay the $3 toll.

She was arrested repeatedly in subsequent years on trespassing and other counts, once after police found her sleeping near tennis courts on Letterman's property in New Canaan, Conn. She once told reporters she left cookies and an empty bottle of Jack Daniel's whiskey in the foyer of Letterman's house during one of her visits.

Ray spent about 10 months in prison and 14 months in a state mental institution on the trespassing convictions.

More recently, she turned her attentions to Musgrave.

He told investigators last year that Ms. Ray had harassed him for four years by calling, writing and sending him packages. She once showed up at Musgrave's Osceola County, Fla., home and turned on all the outdoor faucets.

"I love him and want to spend the rest of my life with him," Ms. Ray said from jail.

She eventually pleaded guilty to stalking and misdemeanor assault on a corrections officer. She was freed in August after receiving credit for time served. At a hearing early this year, a handcuffed Ms. Ray had to be restrained by two guards as a judge pronounced her incompetent to face charges.

Letterman occasionally joked about the incidents. Shortly before he left NBC for CBS in 1993, he alluded to Ms. Ray in his "Top 10 Things I Have to Do Before I Leave NBC." One item on the list was "send change-of-address forms to that woman who breaks into my house."