Temple, known in private life as Shirley Temple Black, died on Monday night at her home near San Francisco. She was surrounded by family members and caregivers, her publicist Cheryl Kagan said.

"We salute her for a life of remarkable achievements as an actor, as a diplomat, and most importantly as our beloved mother, grandmother, great-grandmother, and adored wife for fifty-five years of the late and much missed Charles Alden Black," a family statement said.

A talented and ultra-adorable entertainer, Temple was America's top box-office draw from 1935 to 1938, a record no other child star has come near. She beat such grown-ups as Clark Gable, Bing Crosby, Robert Taylor, Gary Cooper and Joan Crawford.

In 1999, the American Film Institute ranking of the top 50 screen legends ranked Temple at number 18 among the 25 actresses. She appeared in scores of movies and kept children singing On The Good Ship Lollipop for generations.

Temple was credited with helping save 20th Century Fox from bankruptcy with films such as Curly Top and The Littlest Rebel. She even had a drink named after her, an appropriately sweet and innocent cocktail of ginger ale and grenadine, topped with a maraschino cherry.

Temple blossomed into a pretty young woman, but audiences lost interest, and she retired from films at 21. She raised a family and later became active in politics and held several diplomatic posts in Republican administrations, including ambassador to Czechoslovakia during the historic collapse of communism in 1989.

"I have one piece of advice for those of you who want to receive the lifetime achievement award. Start early," she quipped in 2006 as she was honoured by the Screen Actors Guild.

But she also said that evening that her greatest roles were as wife, mother and grandmother. "There's nothing like real love. Nothing." Her husband of more than 50 years, Charles Black, had died just a few months earlier.

They lived for many years in the San Francisco suburb of Woodside.

Temple's expert singing and tap dancing in the 1934 feature Stand Up And Cheer! first gained her wide notice. The number she performed with future Oscar winner James Dunn, Baby Take A Bow, became the title of one of her first starring features later that year.

Also in 1934, she starred in Little Miss Marker, a comedy-drama based on a story by Damon Runyon that showcased her acting talent. In Bright Eyes, Temple introduced On The Good Ship Lollipop and did battle with a charmingly bratty Jane Withers, launching Withers as a major child star, too.

She was "just absolutely marvellous, greatest in the world", director Allan Dwan told filmmaker-author Peter Bogdanovich in his book Who The Devil Made It: Conversations With Legendary Film Directors. ''With Shirley, you'd just tell her once and she'd remember the rest of her life," said Dwan, who directed Heidi and Rebecca Of Sunnybrook Farm. ''Whatever it was she was supposed to do - she'd do it. ... And if one of the actors got stuck, she'd tell him what his line was - she knew it better than he did."

Temple's mother, Gertrude, worked to keep her daughter from being spoiled by fame and was a constant presence during filming. Her daughter said years later that her mother had been furious when a director once sent her off on an errand and then got the child to cry for a scene by frightening her. "She never again left me alone on a set," she said.

Temple became a nationwide sensation. Mothers dressed their little girls like her, and a line of dolls was launched that are now highly sought-after collectables. Her immense popularity prompted President Franklin D Roosevelt to say that "as long as our country has Shirley Temple, we will be all right".

"When the spirit of the people is lower than at any other time during this Depression, it is a splendid thing that for just 15 cents, an American can go to a movie and look at the smiling face of a baby and forget his troubles," President Roosevelt said.

She followed up in the next few years with a string of hit films, most with sentimental themes and musical subplots. She often played an orphan, as in Curly Top, where she introduced the hit Animal Crackers In My Soup, and Stowaway, in which she was befriended by Robert Young, later of Father Knows Best fame.

She teamed with the great black dancer Bill "Bojangles" Robinson in two 1935 films with Civil War themes, The Little Colonel and The Littlest Rebel. Their tap dance up the steps in The Little Colonel (at a time when interracial teamings were unheard of in Hollywood) became a landmark in the history of film dance.

Some of her pictures were remakes of silent films, such as Captain January, in which she recreated the role originally played by the silent star Baby Peggy Montgomery in 1924. Poor Little Rich Girl and Rebecca Of Sunnybrook Farm, done a generation earlier by Mary Pickford, were heavily rewritten for Temple, with showbiz added to the plots to give her opportunities to sing.

In its review of Rebecca, the showbusiness publication Variety complained that a "more fitting title would be 'Rebecca of Radio City'."

She won a special Academy Award in early 1935 for her "outstanding contribution to screen entertainment" in the previous year.

"She is a legacy of a different time in motion pictures. She caught the imagination of the entire country in a way that no one had before," actor Martin Landau said when the two were honoured at the Academy Awards in 1998.

Temple's fans agreed. Her fans seemed interested in every last golden curl on her head: it was once guessed that she had more than 50. Her mother was said to have done her hair in pin curls for each movie, with every hairstyle having exactly 56 curls.

On her eighth birthday - she was actually turning nine, but the studio wanted her to be younger - Temple received more than 135,000 presents from around the world, according to The Films Of Shirley Temple, a 1978 book by Robert Windeler. The gifts included a baby kangaroo from Australia and a prize Jersey calf from schoolchildren in Oregon.

"She's indelible in the history of America because she appeared at a time of great social need, and people took her to their hearts," the late Roddy McDowall, a fellow child star and friend, once said.

Although by the early 1960s she was retired from the entertainment industry, her interest in politics soon brought her back into the spotlight.

She made an unsuccessful bid as a Republican candidate for Congress in 1967. After Richard Nixon became president in 1969, he appointed her as a member of the US delegation to the United Nations General Assembly. In the 1970s, she was US ambassador to Ghana and later US chief of protocol.

She then served as ambassador to Czechoslovakia during the administration of the first President Bush. A few months after she arrived in Prague in mid-1989, communist rule was overthrown in Czechoslovakia as the Iron Curtain collapsed across Eastern Europe.

"My main job (initially) was human rights, trying to keep people like future president Vaclav Havel out of jail," she said in a 1999 Associated Press interview. Within months, she was accompanying Mr Havel, the former dissident playwright, when he came to Washington as his country's new president.

She considered her background in entertainment an asset to her political career.

"Politicians are actors too, don't you think?" she once said. "Usually if you like people and you're outgoing, not a shy little thing, you can do pretty well in politics."

Born in Santa Monica to an accountant and his wife, Temple was little more than three years old when she made her film debut in 1932 in the Baby Burlesks, a series of short films in which tiny performers parodied grown-up movies, sometimes with risque results.

Among the shorts were War Babies, a parody of What Price Glory, and Polly Tix In Washington, with Shirley in the title role.

Her young life was free of the scandals that plagued so many other child stars - parental feuds, drug and alcohol addiction - but Temple at times hinted at a childhood she may have missed out on.

She stopped believing in Santa Claus at age six, she once said, when "Mother took me to see him in a department store and he asked for my autograph."

After her years at the top, maintaining that level of stardom proved difficult for her and her producers. The proposal to have her play Dorothy in The Wizard Of Oz did not pan out - 20th Century Fox chief Darryl Zanuck refused to lend out his greatest asset. And The Little Princess in 1939 and The Blue Bird in 1940 did not draw big crowds, prompting Fox to let Temple go.

Among her later films were The Bachelor And The Bobby-Soxer, with Cary Grant, and That Hagen Girl, with Ronald Reagan. Several, including the wartime drama Since You Went Away, were produced by David O Selznick. One, Fort Apache, was directed by John Ford, who had also directed her in Wee Willie Winkie years earlier.

Her 1942 film, Miss Annie Rooney, included her first on-screen kiss, bestowed by another maturing child star, Dickie Moore.

After her film career effectively ended, she concentrated on raising her family and turned to television to host and act in 16 specials called Shirley Temple's Storybook on ABC. In 1960, she joined NBC and aired The Shirley Temple Show.

Her 1988 autobiography, Child Star, became a best-seller.

Temple had married Army Air Corps private John Agar, the brother of a classmate at Westlake, her exclusive LA girls' school, in 1945. He took up acting and the pair appeared together in two films, Fort Apache and Adventure In Baltimore. She and Agar had a daughter, Susan, in 1948, but she filed for divorce the following year.

She married Black in 1950, and they had two more children, Lori and Charles. That marriage lasted until his death in 2005 at age 86.

In 1972, she underwent successful surgery for breast cancer. She issued a statement urging other women to get checked by their doctors and vowed "I have much more to accomplish before I am through."

During a 1996 interview, she said she loved both politics and showbusiness.

"It's certainly two different career tracks," she said, "both completely different but both very rewarding, personally."