Luckily for posterity, Charlie Wilson was a registered Democrat, because a covert-operating cold-warrior congressman from Texas would have little chance getting his name in lights in Hollywood. The 12-term representative from the Lone Star State was better known as a pork-barrel liberal and colorful rogue who could make Bill Clinton blush, but his “Good Time Charlie” image proved perfect cover for his work as a member of the defense appropriations subcommittee. Wilson, it turns out, quietly funneled millions of dollars into a black budget that fueled the Afghan mujahideen’s struggle against the Russians, culminating in the retreat of the Red Army in 1989.

In Charlie Wilson’s War, an entertaining and well-crafted romp through the Reagan era, director Mike Nichols and screenwriter Aaron Sorkin not only hone this flawed but fervent anti-communist into an American hero, they persuade the audience to cheer for the CIA. Reversing the trend of political movies this year, the filmmakers have fashioned what will surely be one of the season’s box-office hits—proving that progressives can make popular movies about controversial subjects when they resist the urge to sermonize.

It helps that history looks kindly on the collapse of the Soviet Union (at least so far), and that the West remains supportive of a free Afghanistan (free of the Taliban, anyway), but leave all this aside…Charlie Wilson’s War takes a nonpartisan approach to truth, justice and the American way. Tom Hanks turns on his comic charm as the hard-drinking, skirt-chasing, pothole-filling legislator from small-town East Texas, the kind of politician who coddles good ol’ boy constituents while sleeping with their debutante daughters. All in good fun. The wonderful thing about Wilson, according to Hanks’ performance, is that he doesn’t take himself seriously, except as a student of history and opponent of communism. His theoretical distaste for tyranny is put to the test when he stumbles upon an unexpected opportunity to bring down an evil empire.

That opportunity was named Joanne Herring, a wealthy and attractive Houston socialite and philanthropist (and former talk-show host) with an interest in global politics. Joanne, played by Julia Roberts with meretricious grace, wants Charlie, her part-time lover and confidant, to put his Washington connections to work for her pet cause, the liberation of Afghanistan, and she uses her Texas wiles to persuade him to pay a courtesy call on the Pakistani prime minister, an ally of the mujahideen. After touring a refugee camp (recreated in dramatic fashion on location in Morocco), where children with missing limbs explain the Russian ruse of disguising land mines as toys, Charlie pledges to find money for weapons and training.

Here’s where the story gets interesting, in a “West Wing” back-corridors-of-power way. Because the United States couldn’t afford to antagonize its archenemy and risk open warfare, the CIA counterpunched the USSR through proxies, arranging Byzantine transactions of cash and guns via third parties who, despite longstanding enmities, cooperated to keep the Soviets out of the Gulf. Charlie’s dodgy relations with favor-seeking donors and scandal-hungry journalists prepared him well to negotiate with Israeli arms dealers, Egyptian bureaucrats and Baptist politicians from Louisiana.

Charlie couldn’t have accomplished his Miracle on Independence Avenue—upping under-the-table aid to Afghanistan from $5 million to $1 billion—without help from a streetwise spook with a chip on his shoulder, Gust Avrakotos, evoked by Philip Seymour Hoffman with consummate irascibility. A blue-collar Greek-American among the blueblood WASPs who ran the Firm with a sense of entitlement, Avrakotos knew how things worked in realpolitik’s demimonde and had no patience for diplomatic posers. Chain-smoking, whiskey-guzzling, his mouth as foul as his clothes are frumpy, Hoffman steals every scene he’s in—forgivable in a movie about spies and liars.

Charlie Wilson’s War gives us Washington as we like to imagine it, full of scalawags, scamps and scoundrels (that is, legislators, lawyers and lobbyists) who cavort with sexy (and intelligent!) Capitol aides at swank parties where powerbrokers casually do deals that make the world go ’round. The District actually seems like an exciting place to work. Nichols and Sorkin leave us smiling, flush from the witty script and fast-paced direction. They tack on a cautionary ending, but in this film, public policy is played for laughs rather than dissected in spite, and for 90 minutes we bask in escapist entertainment. Nothing like a good yarn based on a true story.