SAN DIEGO (AP) _ In the five months since he left his hometown of San Diego, Andrew Cunanan left a trail of bodies across the nation, but little trace of himself.

No one may ever know what made him tick. By all accounts, he was a brilliant, complex man driven by envy, greed and a deep desire for notoriety.

If attention was what he was looking for, he got what he wanted. But his moment in the spotlight ended Wednesday when he killed himself on a houseboat in Miami Beach, 2 1/2 miles from the spot where he allegedly shot his fifth victim, fashion designer Gianni Versace.

``I feel sorry for the person holed up in a houseboat knowing he killed five people and holding the gun of the first person he killed _ a person he considered to be his best friend,'' said Daniel O'Toole, an acquaintance who last saw Cunanan in April in San Francisco.

``It must have been a difficult final hour for him. I don't know why this had to happen. It's a total tragedy.''

His time as a fugitive was foreshadowed by elaborately fabricated tales he told to friends from San Diego to San Francisco: His surname was DeSilva. He had a wife and child in the Bay Area. He came from a wealthy, Jewish family that owned a national parking lot company.

Friends and acquaintances said he was alternately a bookish intellect who could talk politics and world affairs and a ``party boy'' who danced barechested in bars.

He was voted most likely to be remembered by his classmates at a private Episcopalian high school and was, according to those who knew him, a brilliant student.

``He was incredibly vivacious,'' said Louis Feuchtbaun, a friend in New York who met him in San Diego four years ago. ``He was very, very well read and very intelligent. It was always a real pleasant social experience to talk with him.''

The youngest of four children, Cunanan, 27, was born and raised in San Diego. His parents split up in 1988 when his father, Modesto, fled to his native Philippines amid allegations he had embezzled thousands of dollars from his stock-brokerage company.

Cunanan graduated in 1987 from The Bishop's School, where classmates remembered him as an outgoing young man who acknowledged _ some say even flaunted _ his homosexuality. He once wore a flashy red patent leather jumpsuit to school _ a gift, he said, from a wealthy lover.

After graduation, Cunanan attended the University of California at San Diego, where he studied history but never got a degree. He earned a reputation as a partyer, frequenting hard-rock bars catering to young professionals.

Friends described Cunanan as a popular figure in the gay community who was secretive about his work and money. He spent lavishly on dinners and gifts for his friends, using money he received from wealthy, older gay men.

His most recent benefactor was Norman Blachford, a businessman in his 60s who lives in a lavish Venetian-style home overlooking the Pacific Ocean in La Jolla. He gave Cunanan a $2,500 monthly allowance, use of his credit cards and a dark green Infiniti J30, which Cunanan sold after they split up.

When not supported by someone else, friends said, Cunanan earned extra cash by selling drugs, mostly mood-altering prescription pills.

They said his life began spinning out of control in the past year as he became addicted to drugs, gained weight and no longer had the means to support his expensive lifestyle.

The murders began April 29. First David Madson, 33, a Minneapolis architect and ex-lover; then Trail, 28, a former Navy officer whom Cunanan considered one of his best friends; then Lee Miglin, 72, a millionaire Chicago developer; then William Reese, 45, caretaker of a Civil War cemetery in Pennsville, N.J.

Finally, Versace.

As the manhunt intensified, psychologists and criminal experts theorized Cunanan was becoming increasingly desperate and poised to kill again. All the talk stopped Wednesday when a gunshot rang out from the Miami Beach houseboat.

``It's a strange kind of relief,'' said O'Toole, Cunanan's acquaintance from San Diego. ``There's no closure. No one is ever going to know why he did it.''