He was the best friend a collie ever had—the boy Lassie bounded to greet from 1954 to 1957. But when Tommy Rettig left behind his role as honest and upright farm boy Jeff Miller, he discovered that life beyond a TV backdrop can be perilous, and, without Lassie, it can be awful hard to find your way home. At 33, 18 years after he left the show, Rettig was about to face 5½ years in prison for conspiracy to smuggle cocaine. Although he was found innocent on appeal, he was given two years' probation for possession of marijuana.

It was never supposed to be that way. "I wanted to be a real kid and see what the real world was like," Rettig says of his decision to quit show business at 15. "I wanted to be one of those people I portrayed." He has never quite achieved that dream. But today, 13 years after his drug bust, Rettig, now 46 and a grandfather, sits behind a desk in his Marina Del Rey home, which is also the office of his successful computer software company, and feels he has come a long way. After his drug trials, he tried out vegetarianism and est-like workshops, then finally hooked up with computers in the early '80s. In 1982 he started writing help systems for dBASE, a popular filing program for personal computers, and by 1985 he was overseeing Tom Rettig Associates, a software consulting firm whose clients include the Security Pacific Bank and the Los Angeles Times. Now, like the sailboats he can see tranquilly plying the channel beyond his house, he seems at last to be navigating a smooth and steady course, drug free and comfortable with the fact that fame is far back in his wake.

Unlike many child stars, Rettig says his early success was not the result of pushy parents. His dad, Elias, then an aircraft-parts inspector with Lockheed, and mom Rosemary, a housewife, wanted their only child to be a doctor or lawyer. But living in the Rettigs' apartment building in Queens, N.Y., was a talent agent who spotted 5-year-old Tommy's potential. She persuaded his parents to let him meet Richard Rodgers and Oscar Hammerstein, then casting the touring company of Annie Get Your Gun, starring Mary Martin. For two years Rettig traveled the country, playing Martin's kid brother to adoring reviews, one of which dubbed him "the baby Barrymore." Says Tom: "It was like running off and joining the circus." After his tour he got work on New York radio shows, which led Elia Kazan to cast him as Richard Widmark's son in the movie Panic in the Streets. Forgetting the professions they once wanted for their son, his family moved to Hollywood, and from 1949 to 1956 Tommy made 18 movies and frequent TV appearances. One of the latter was with Ronald and Nancy Reagan. "They didn't talk to me," Tom says, "unless they were reading dialogue."

It was while he was making the movie The 5,000 Fingers of Dr. T. that Rettig met dog trainer Frank Weatherwax, whose brother, Rudd, bought the Lassie rights from MGM for a TV series. To determine who would make the best Jeff, the brothers invited Tommy and two other child actors to spend a week at their North Hollywood ranch with the three collies who would play the lead. Tommy not only won the contract—$2,500 a week at its highest—but the love of the top-billed dog, so much so that he was occasionally allowed to take him home on weekends. That privilege came to an abrupt end when Lassie became so attached to him that she began to disobey her trainer; from then on, Tommy could see Lassie only on-camera.

Filming 39 shows a season, six days a week, proved less cheering than the show, however. "It was a nightmare—just hit your mark and say your lines," says Rettig. More than anything, he by then wanted to be a normal teen, so he rejected a three-picture deal in Europe to attend Los Angeles' University High. But being part of the crowd wasn't easy, even there. Rettig still remembers one school bus driver who, approaching La Cienega Boulevard looked back at him with a smirk and hollered, "Lassie-enega!" "I wanted to die," Rettig says.

Fame did bring some compensations. "I'd say, 'Gee, Mrs. Jones, can I keep your daughter out until 2 a.m.?' She'd say, 'Oh, you're the nice boy from Lassie. Of course, she can stay out all night.' I had a halo on my head, but it was hiding horns."

A few months after graduating from high school, Rettig, still searching for a normal life, met aspiring singer Darlene Portwood. Six months later they married, and within two years they had two boys, Tom and Deane. Rettig took odd jobs and tried to go back to acting, but rebels—not nice boys—were then in vogue, and he got nowhere. "I went into the most painful period of my life," he says. "I considered suicide every day." He tried a restaurant management course, but on the second day, when he was recognized by a customer, he took off his apron and left. Some stage plays and a soap opera, Never Too Young, came along, but it was too little, too late.

By now Rettig had caught the self-fulfillment bug of the '60s, and he began reading Aldous Huxley and Alan Watts, who talked about the affirming power of hallucinogens. Could they be the panacea for his problems? A 1966 LSD trip seemed to answer yes. Rettig, envisioning himself next to a lizard on a leaf, says he had an epiphany about the thread of life and then tripped once more. "The drugs showed me what a good life I had and that I was pissing it away blaming people," Rettig says.

In 1971 Lassie's former co-star, now a full-fledged flower child, turned 30. Growing weary of urban life, he took his family to live on a farm near Arroyo Grande, Calif. He claims it was "a wonderful life," but it was hardly the kind Frank Capra had in mind. Rettig grew marijuana between rows of corn, and a neighbor turned him in. After spending a night in jail, he was released on a year's probation.

Three years later, Rettig made his biggest mistake: He went to Peru with friends who were on a cocaine-smuggling mission. "These weren't gangsters," he argues, "but middle-class people whose parents were lawyers and doctors." He says he went to gather research for a book. Returning home, he got an anonymous telephone tip warning him to dump any drugs he had fast, and he was flushing a pound of grass down the toilet when 15 drug-enforcement agents broke down his door, searched for eight hours, but didn't find any cocaine.

Rettig was tossed into San Luis Obispo jail for three days, and Darlene soon split, taking the kids, although they later moved to the same West Los Angeles neighborhood. "She had enough of my adventuresome spirit," says Rettig. "How she ever tolerated living with me, I don't know." But he always considered himself a good parent. "While some things I did were against the law," he insists, "I don't feel I committed any great crime against society."

A few years before his sons went off to college (Tom Jr., 28, is now a deejay in Concord, N.H., with a wife and a 1-year-old son; Deane, 27, works for a music computer software company in San Rafael, Calif.), Rettig began cleaning up his act. "I was 35 and seeing people my age have health problems," he says. "So I became a vegetarian, stopped cigarettes and drugs and started exercising." After his conviction was overturned in 1979, Rettig rented a one-bedroom apartment in Malibu and found work as an insurance broker. His mother had died in 1971 and his father in 1980, leaving Rettig $40,000; he used that money to start his own est-like workshops. While making mailing lists for his new enterprise, he got interested in computers, and in 1983 he hooked up as a programmer with Ashton-Tate, publishers of dBASE. Inspired to strike out on his own, he has since published such upbeat programs as Tom Rettig's Library and Tom Rettig's Help.

Last June, Rettig began seeing Ellen Sander, a free-lance writer and computer consultant whom he met at a computer fair. "We're both nerds—nerd and nerdette," says Sander, 41. "Our most famous thing to do is sit around writing and programming." Vows Rettig: "I'm at the happiest place I've ever been. I'm happy with myself, my career and my life." Now all he needs is a dog.

—John Stark, and David Lustig in Los Angeles