Mark Twain-inspired ''Back to Hannibal'' -- The new TV movie finds Tom Sawyer and Huck Finn back in their home town as adults

Mark Twain used to poke fun at his home state by telling about a little boy who learned he was moving to Missouri. He bade the trees farewell; he told the grass goodbye. And then he tilted his face heavenward and said, ”Goodbye, God. I’m goin’ to Missouri.”</p

St. Charles, Mo., did seem godforsaken to the creators of Back to Hannibal when they arrived there in April to make a movie about Twain’s beloved rascals, Tom Sawyer and Huck Finn, now all grown up and quelling a lynch mob. The $2.8 million film, to air Oct. 21 on the Disney Channel’s The Magical World of Disney, shows a serene mid-19th-century Hannibal where barefoot boys frolic and ruffled women flounce along the boardwalk. But during the two months of filming, Missouri seemed to rival Egypt for plagues. Heavy rains came every day — except when the script called for them. There was a flood. A tornado.

During all this, the moviemakers had to transform St. Charles, 1990, into Hannibal, 1857. They had to dress up a huge cast, including 600 local extras, with hats and curls and whiskers. They had to build a levee for two riverboats and shoot between the whirring of jets that took off and landed every dozen minutes or so at St. Louis’ airport, just across the river.

Further, they had to rely on the resiliency and considerable charms of their stars — the rosy-cheeked guile of Raphael Sbarge (Risky Business) as Tom; the boyish earnestness of Mitchell Anderson (Doogie Howser, M.D.) as Huck; the palpable integrity of Paul Winfield (King) as the former slave Jim; and the wistful appeal of Megan Follows (Anne of Green Gables) as Becky Thatcher.

”I worked on The Blue and the Gray,” producer Hugh Benson said, ”and I was in Budapest doing Anna Karenina. And nothing has been this big.”

Benson thought of taking Twain’s characters into the future after buying a copy of The Adventures of Tom Sawyer for his granddaughter on her birthday. Scriptwriter Roy Johansen then throttled Tom and Huck forward to their 20s, with Tom as a wily lawyer and Huck as an eager newspaperman, and reunited them to absolve Jim of murdering Becky’s riverboat-owning husband. If that’s not intriguing enough, Tom still carries a candle for Becky, who turned him down when he asked for her hand.

St. Charles (pop. 47,380), although not on Tom and Huck’s beloved Mississippi River, provided everything the moviemakers needed. It has the largest restored historic district in the state and is on the banks of the Missouri, an imposing stand-in for the Mississippi. In Defiance, 30 miles south, Daniel Boone’s house became the Thatcher home, to which Tom comes in search of his lost love. But St. Charles was less wonderful for the visiting talent. The one Ramada had no restaurant or room service. The nearest nightlife was across the river in St. Louis. After the long days, Sbarge made soup on a hotplate in his room. Winfield studied the recipe sections of the local papers, and Ned Beatty, who plays the slippery Duke of Bridgewater, made a balsa-wood Piper Cub model airplane. Anderson and William Windom (who plays Becky’s father) played tennis with St. Charles Mayor Grace Nichols.

Most St. Charles residents welcomed the troupe, who brought $1 million into town; director Paul Krasny alone collected, by one count, 80 canes and 30 quilts in local antique shops. Shopkeepers closed their stores for days while the movie people hung lace curtains and wooden signs to re-create the past. Citizens didn’t grumble when the crew spread oak mulch on the cobbled streets to make them look old and dusty or even when the rains flushed the gunk into the sewer system and clogged it. Between takes, they asked for autographs from the stars, who donned Ray-Bans with their old-time suspenders.

Hollywood strutted its stuff, and Mother Nature got it muddy. One day the river rose, driving a big log right through the fake levee and boardwalk. Said set designer Robb Bacon as he watched a videotape showing his $60,000 set drifting downstream, ”I have never seen the power of this river.”

That was something Twain made sure Tom and Huck would never forget — no matter how old they got.