The woman who went to prison for repeatedly stalking David Letterman committed suicide by kneeling in front of an oncoming train.

Margaret Mary Ray, 46, left only a phone number to call a friend who could notify relatives before she died Monday afternoon, Delta County Sheriff Bill Blair said Tuesday."This lady just walked out, knelt and leaned over the track, and the train couldn't stop," Blair said. "She was killed instantly."

Letterman said Tuesday: "This is a sad end to a confused life."

Ray spent various terms in prison, jail and mental institutions over the years for harassing Letterman and, more recently, former astronaut Story Musgrave.

Ray was first arrested in 1988 while driving Letterman's Porsche near the Lincoln Tunnel in New York City. 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 Daniels whiskey in the foyer of Letterman's house during one of her visits.

In a 1992 interview with The Advocate of Stamford, Conn., Letterman said he had tried everything to discourage Ray.

"The thing is, she's insane," Letterman said. "And you don't want to do anything to make it worse than it is."

More recently, she turned her attentions to Musgrave.

He told investigators last year that 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.