In accordance with movie law, every boxing movie must include a Big Fight Scene, and indeed “Chuck” obeys that rule — but with a twist.

The climactic brawl actually takes place about halfway through the movie. Not sure we’ve seen that before.

Yep, they made a movie about the boxer whose story inspired the most beloved movie ever about boxing. “Chuck” is based on the true-life ups and downs of Chuck Wepner, a journeyman heavyweight who was plucked out of semi-obscurity (and New Jersey) to play sacrificial ham-and-egger to the great Muhammad Ali — only to shock the world by knocking Ali down and coming within seconds of lasting the entire 15 rounds with The Greatest.

Struggling actor-writer named Sylvester Stallone saw the fight and, as lore has it, was inspired to pen the screenplay for “Rocky.” (More on that in a moment.)

Liev Schreiber is outstanding as the hulking, rough-edged, amiable and charismatic Wepner, whose primary skill in the ring was his Jake La Motta-esque ability to take a punch and keep on fighting, resulting in one of the most ignominious names in pugilistic history.

They called him “The Bayonne Bleeder.”

Director Philippe Falardeau (working from a script by Jeff Feurezeig, Jerry Stahl and Michael Cristofer) does an excellent job of establishing the mid-1970s era of the film, from the dubious fashions to the ugly and boxy cars to a soundtrack brimming with never-needed-to-hear-that-one-again songs as “You Ain’t Seen Nothing Yet” by Bachman Turner Overdrive and “You Sexy Thing” by Hot Chocolate. (There’s also a little bit of a mini-“Goodfellas” vibe to the story structure and editing choices here.)

In 1975, Wepner was 35, nearing the end of a decidedly unremarkable boxing career and working as a liquor salesman. He was tapped as an easy patsy for Ali’s first fight since Ali’s famous “Rumble in the Jungle” bout against George Foreman, and suddenly found himself appearing on talk shows and on the cover of Sports Illustrated.

Ron Perlman is a screen-chewing hoot as Chuck’s crass but loyal manager Al Braverman. When Chuck says Ali is boxing royalty, Al counters: “You’re boxing royalty too. You’re the king of dirty fighting.”

Still, despite his public bravado and his tavern bragging, Chuck knows he’s hopelessly outmatched. As Chuck tells his wife Phyliss (Elisabeth Moss) on the eve of the fight, he just wants to go the distance.

The fight scenes are well choreographed, with 40-1 underdog Chuck surprising even himself by flooring Ali in the ninth round and lasting until there were 20 seconds left in the 15th round, when the ref declared Ali the winner by TKO, turning Wepner instant an instant nationwide celebrity.

But wait, there’s a whole other movie to come.

If anything, “Chuck” is even more entertaining in the second act, as Wepner gets high on his own fame (not to mention copious amounts of drugs), strays from his long-suffering wife and get as a new nickname: “The Real Life Rocky,” as the fictionalized version of his story becomes an Oscar-winning box office smash.

Chuck becomes friendly with Stallone (Morgan Spector does a nice impression of mid-1970s Sly), even auditioning for a role in “Rocky II.”

It took years before Wepner received any monetary compensation for inspiring “Rocky,” but given Stallone reportedly gave his blessing to “Chuck,” and scenes from “Rocky” are used in the film, there no longer seems to be any question Wepner was indeed the real-life Rocky.

Pooch Hall (who plays Schreiber’s half-brother, a boxer, on “Ray Donovan”) does fine work playing Ali, while Michael Rapaport shines as Chuck’s estranged brother and Jim Gaffigan is stellar as Chuck’s partner in misadventures. Naomi Watts adds some bright notes as the tart-talking bartender who became Wepner’s second wife.

You could call this one a “side-quel.” It’s not a sequel or a prequel to any of the “Rocky” movies, but it IS a companion piece of sorts, taking a side road to tell the story of the real-life guy whose grit and guts started Rocky up those steps.

★★★1⁄2

IFC Films presents a film directed by Philippe Falardeau and written by Jeff Feuerzeig and Jerry Stahl. Rated R (for language throughout, drug use, sexuality/nudity and some bloody images.). Running time: 101 minutes. Opens Friday at Landmark Century Centre.