When they’re done right, caper movies can have a special kick, and “American Hustle” has definitely been done to a twisted turn. David O. Russell’s loopy, messy reworking of the 1970s Abscam scandal is like “The Sting” with bell bottoms instead of fedoras and Duke Ellington in place of Scott Joplin—not to mention plenty of male-female action rather than bromance. But like that Newman-Redford period puzzler it’s great fun.

Christian Bale, almost unrecognizable with an unruly wig and forty additional pounds (perhaps the ones Matthew McConaughey lost for “Dallas Buyers Club”—an example of the Hollywood way of maintaining balance in the universe), plays Irving Rosenfeld, the quasi-fictional counterpart of real-life con man Mel Weinberg, who was forced by the FBI to participate in the sting operation that led to the conviction of several prominent New Jersey politicians on bribery charges. The script by Russell and Eric Warren Singer changes names and fiddles with facts—the usual “based on a true story” introductory card here becomes “some of this actually happened”—but holds to the general arc of the scam, which persuaded the officials to grease bureaucratic wheels to secure rulings beneficial to a fictitious Arab sheik.

In this telling, Rosenfeld, a small-time con artist working with his mistress-partner Sydney Prosser (Amy Adams), who for the purpose of fleecing their marks poses as a British noblewoman, is effectively blackmailed by ambitious FBI agent Richie DiMaso (Bradley Cooper) into becoming his undercover hireling. The original intent is to target other small-timers, but soon the operation morphs into one aimed at Camden mayor Carmine Polito (Jeremy Renner). He’s basically a good guy, but so anxious to secure investment funds for a casino that will revitalize Atlantic City that he’s willing to involve himself—and other pols—in shady deals to get the money from that phony sheik (actually an FBI agent played by Michael Pena). Building his relationship with Polito requires Rosenfeld to involve his wife Rosalyn (Jennifer Lawrence), a wacky, unstable broad who has an agenda of her own—including a face-off with her rival Sydney.

While all this sounds relatively straightforward, however, “American Hustle” jazzes up things with all sorts of wildly off-the-wall twists. The most egregious is the characterization of DiMaso, a guy who perms his hair, lives with his mother, and frankly is more underhanded than the con artists he’s supposedly controlling. (His scenes with his long-suffering, unsupportive boss, played with fumingly submerged impatience by Louis C.K., are priceless.) He even jumps into the sack with Sydney, though she’s still playing the part of Lady Edith. Another is the portrayal of Polito, who sports a hilariously sculpted pompadour and comes across as a mensch just trying to help his constituents, even if he has to cut corners to do so. (In fact, Rosenfeld not only apologizes for taking him down, but tries to get him a lightened sentence.) And just to add a touch of real danger, Robert De Niro shows up as Victor Tellegio, a mob boss who travels from Florida for a conference that could unravel the entire scheme. He brings a bit of genuine menace to what seems an almost absurdly implausible entrapment operation.

And that’s merely the tip of the iceberg. The screenplay abounds in convolutions that undercut expectations and take matters in new directions, including a major one toward the close that Russell and Singer might have borrowed from Peter Stone’s “Charade.” And while the general mood is of over-the-top wackiness, there are occasions when the mood turns surprisingly serious—like Tellegio’s appearance, or Rosenfeld’s final encounter with Polito. To be honest, some of the transitions are so abrupt that it seems as though Russell’s lost control and the picture’s going off the rails.

That it never does is largely the result of Bale’s extraordinary performance, which anchors the film, giving it, if you’ll excuse the expression in view of those forty pounds, some real heft. The other leads—Cooper, Adams and especially Lawrence—have showier roles, and they’re all very good, as is Renner. But it’s Bale who holds everything together and keeps the movie emotionally on track. In his hands Rosenfeld comes across as a person you can root for: he may be a crook, but he’s more honest than most of the people he has to deal with. That’s why he—and we—can sympathize with Renner’s Polito, too: he’s actually trying to help people rather than merely line his own pockets. For all its farcical elements, “American Hustle” is really quite sophisticated in the complexity of its characters.

This isn’t a pretty film visually, but production designer Judy Becker, art director Jesse Rosenthal, set decorator Heather Loeffler and costume designer Michael Wilkinson have outdone themselves in capturing the seedy milieu of the late seventies in Jersey, and their work is enhanced by Linus Sandgren’s lithe camerawork and the sharp editing by Jay Cassidy, Crispin Struthers and Alex Baumgarten. They all help to make this a movie that challenges you to keep up, but keeps giving you great reasons to try—and so does the score, which mingles original music by Danny Elfman with period tunes selected by Susan Jacobs.

Like “The Sting,” “American Hustle” ends up conning viewers as well as some of its characters. And again you’ll be happy to have been so thoroughly had.