Fred Rogers, the gentle, soft-spoken and avuncular host of the children's television show "Mister Rogers' Neighborhood," whose theme song "Won't You Be My Neighbor?" engaged toddlers for nearly four decades, died yesterday of stomach cancer at his home in Pittsburgh. He was 74.

As creator and host of the popular public television show, Rogers became one of America's most beloved figures. He helped shape the medium of children's educational television and in the process evolved into a national pop icon.

Admired by parents and parodied by comedians, his cheerfulness and wholesomeness translated into a calming, reassuring presence for generations of children.

His show aired nationally from 1968 to 2001, making it the longest-running children's program on public television and among its top-rated ever, reaching at its peak an estimated 8 million households each week. Rogers wrote and produced several weeks of new programs each season at the Pittsburgh public television station WQED. There were nearly 700 episodes in the series.

Over the years, "Mister Rogers' Neighborhood" won four daytime Emmy Awards. He won a George Peabody Award in 1993 and a lifetime achievement award of the National Academy of Television Arts and Sciences in 1997 and received more than two dozen honorary degrees from such institutions as Yale University, Hobart and William Smith Colleges, Carnegie Mellon University and Boston University.

In July, about a year after the show's last original episode aired, President Bush awarded Rogers the Presidential Medal of Freedom.

Rogers's announcement that his show would end generated headlines across the country. The final show was taped in December 2000 and was broadcast in August 2001, although PBS affiliates continue to air reruns.

In a reassuring tone and leisurely cadence, Rogers spoke to children about the virtues of civility, sharing, tolerance, obedience and self-worth. He was praised for an ability to talk to children at a pace they could absorb and with a consistency that created a calm and safe place for toddlers.

He began his shows by walking through the front door of a tidy living room setting, cheerfully singing: "It's a beautiful day in the neighborhood, a beautiful day for a neighbor. Would you be mine? Could you be mine?"

While singing, he changed out of his sport coat for a zip-up cardigan and slipped off his dress shoes and into a pair of blue sneakers. One of his sweaters, a red one, is part of the Smithsonian Institution's collection. The start of the show was a symbolic transition from the work world to a comfortable visit with his vast audience of pint-size people.

Reaching children with a positive message had been his goal since he developed a revolutionary idea for an educational children's program in the early 1950s, when he first worked for WQED. He was producer of "The Children's Corner," a live, hour-long program with puppets and host Josie Carey.

Rogers made his first on-camera appearance in the early 1960s while working for the Canadian Broadcasting Corp. in Toronto. It was there that he produced a 15-minute daily program called "Misterogers." By the mid-1960s, the shows were lengthened to 30 minutes and moved to Pittsburgh. Vastly different from the commercial animation shows created for children, Rogers's shows gained wide appeal among parents.

When the show was threatened with cancellation for lack of funding, there were strong parental objections and eventually a grant from the Sears-Roebuck Foundation and matching funds from National Educational Television.

On Feb. 19, 1968, the newly rescued version was broadcast for the first time and went national, and it would run continuously until the final airing in 2001. It followed a simple formula with education always at the core. A video field trip might show children how crayons are made, or that a visit to the barbershop for a haircut doesn't hurt. There were shows to help children who might be worried about a newborn in the house, the death of a family pet, rivalry with a sibling or enrolling in a new school. There were weightier issues, including divorce.

Rogers reinforced the show's theme in a visit to his Neighborhood of Make-Believe, inhabited by friendly puppets navigating their way through similar problems. Live guests were also featured. Among the most memorable were renowned musicians including pianist Van Cliburn, opera baritone John Reardon and cellist Yo-Yo Ma.

Rogers often said he was guided by listening to children, discovering who they were and what was important in their lives. By providing answers to children's questions and addressing their uncertainties in their expanding world, he sought to aid their emotional development as individuals.

"There is continuity that goes through the generations," Rogers wrote in his book "You Are Special." "There has never been a time in our history when there have been so many changes. But we all have different gifts and different ways of saying to the world who we are. The world needs a sense of worth, and it will achieve it only by its people feeling they are worthwhile."

One of his early and few commercial ventures was support of a life-size rendition of his Neighborhood of Make-Believe, at the Idlewild and Soak Zone amusement park in Ligonier, Pa. The ride features a trolley that takes passengers, old and young, through a patch of woods, where some of Rogers's puppet creations from the show, such as Ana Platypus, Daniel Striped Tiger, Henrietta Pussycat, Lady Elaine Fairchilde and X the Owl, talk of a hug-and-song party at the castle of King Friday XIII.

"No other amusement ride encourages parents, children and other relatives to end with a hug and singing a song," said Keith Hood, who was general manager of Idlewild Park when the Neighborhood of Make-Believe opened in 1989. "When you talked to Fred, what you saw is what you got. He was truly a genuine person with high ideals and values. The world needs more Fred Rogers."

Fred McFeely Rogers was born in Latrobe, Pa., a small industrial town about an hour's drive east of Pittsburgh. He was a son of a successful businessman, and he said one of the most important people in his early years was his grandfather McFeely, who often told him, "I like you just the way you are."

It was a refrain he often repeated on his show.

Rogers excelled academically in high school and briefly studied Romance languages at Dartmouth College. He graduated with a degree in music composition from Rollins College in Winter Park, Fla., in 1951, then put on hold his plans to attend a Presbyterian seminary when he began to notice the power of television as a medium of mass communication.

It was the early 1950s, as he recalled in "You Are Special," when he became appalled at the shows that were labeled children's programs -- pies in faces and slapstick.

"Children deserve better. Children need better," he wrote.

He got his first job in television in 1951 as a floor manager for the network music programs at NBC in New York. Two years later, he joined Pittsburgh's newly formed public television station, WQED, as co-producer of "The Children's Corner."

To deepen his understanding of how to serve children and their families through mass media, he began attending Pittsburgh Theological Seminary. He was ordained a Presbyterian minister in 1963 with the specific charge of helping families through television. He worked closely with experts in child psychology such as Margaret McFarland, director of the Arsenal Family and Children's Center of the University of Pittsburgh.

On the television set, he was a demanding boss who shouldered most of the responsibilities, writing the scripts, composing the music, hosting the show and manipulating and providing the voices of the puppets. The regular supporting cast in the low-cost production included David Newell, who played the speedy deliveryman Mr. McFeely, and Joe Negri, a guitarist who played a handyman in the Neighborhood of Make-Believe.

"If he was angry, he would go to the piano and just play," Newell said. "He was not a yeller. He was just one of the nicest persons you could meet, a true friend."

Like his show, Rogers showed diverse interests in his personal life. He read voraciously, swam daily, played the piano and enjoyed listening to classical music. In interviews, he said he began his days with two hours of quiet time, reading, thinking and praying. When not at his home in the Squirrel Hill section of Pittsburgh, he worked on his television scripts at his summer home in Nantucket.

Even as his goody-goody image made him the target of jokes -- comedian Eddie Murphy spoofed Rogers in "Saturday Night Live" skits called "Mister Robinson's Neighborhood" -- Rogers remained gracious, calling it a form of flattery.

Rogers served as chairman of the board of Family Communications Inc., a nonprofit corporation he founded in 1971 to produce educational books and child-development videos that encourage the healthy emotional growth of children and their families.

In the aftermath of the Sept. 11, 2001, terrorist attacks, Rogers returned to television, making public service announcements for PBS to help parents and children cope with anxiety.

His most recent book, "The Mister Rogers' Parenting Book," was published last year.

Survivors include his wife of 50 years, Joanne Rogers, a concert pianist; two sons; and two grandsons.

Fred Rogers started work in the kingdom of educational children's television in the 1950s and taped his last show in December 2000.Fred Rogers pauses during taping of his show, where the trolley traveled to the Neighborhood of Make-Believe.