EXCLUSIVE: HBO is nearing the big deal of the Toronto Film Festival, acquiring for a sum nearing $20 million world rights to Bad Education, the Cory Finley-directed fact-based dark comedy that stars Hugh Jackman and Allison Janney as supervisors in the Roslyn, Long Island, school district who masterminded the largest public-school embezzlement scandal in American history, to the tune of $11.2 million.

The WarnerMedia-owned company will air the feature globally where it has networks and streaming services. I’m told the deal is in the rarefied range of the $17.5 million at Sundance for The Birth of a Nation, which was the fest record.

Heading into Toronto, the film came in with the best chance of being an eight-figure festival acquisition. This one quickly came down to the producers and financiers faced with making a choice that will be more commonplace as fests go forward. Did they want a streaming deal, gamble for less money for a theatrical release with companies like 101 Studios, which seemed favored by Jackman and Janney, the latter of whom came out of the Toronto Festival two years ago when Neon bought the black fact-based comedy I, Tonya, and rode it all the way to a Best Supporting Actress win, with Margot Robbie also getting a nom for Best Actress. Or choose an alternative, which they did with HBO, which has a star-studded original that it can play on the network and its other platforms in 2020 and which will be Emmy, SAG and Golden Globes contenders for next year for HBO as it moves forward from the Game of Thrones era.

Related Story 'Bad Education': Cory Finley's 'Cautionary Tale', Allison Janney's 'Fascinating' Role & Hugh Jackman's Tap Dancing — Toronto Studio

Scripted by Mike Makowsky — who attended school at Roslyn as the scandal unfolded in the early 2000s — the film also stars Ray Romano as the school board president who becomes an unwitting participant as he and board members give in to the prodding of superintendent Dr. Frank Tassone (Jackman) to fire the assistant superintendent Pam Gluckin when it is unmasked she dipped into taxpayer school funds to renovate her homes, but not report it to anyone outside the circle. The school board and student parents are obsessed with an upcoming school budget vote they hope will lead to the appropriation of $7.5 million for a “skywalk,” and the report that as Roslyn climbs to the top of nearby schools the property values of homes in the district are soaring.

The plan begins to crumble because of the dogged work by a student newspaper reporter –Geraldine Viswanthan — who is initially deemed harmless and given carte blanche access to eyeball school purchase orders. She questions the obsession with a “skywalk” and boasts of school excellence when it is so clear that the school roof is practically falling in, with drop ceilings stained and mottled from water that drips into strategically placed trash baskets each time it rains. She discovers a scandal that goes far beyond the fired administrator.

The smokescreen allows for a tour de force for Jackman to do a slow peel of a man who starts out the ultimate administrator, a meticulously coiffed and dressed symbol of positivity and authority, who remembers the name of every student he meets and is the one who tells the student journalist that her assessment of her assignment as a puff piece can be much more.

The slow reveal is that Jackman’s administrator has appropriated millions of dollars to finance a double life. While he leaves in plain view a desk photo of a woman in a wedding dress he says is his late wife who died of cancer, Tassone has a secret identity as a closeted gay man who is not at all monogamous and not shy about having taxpayers foot his bills, including for plastic surgery to keep his face tight. He has a lot to lose, in a fascinating depiction of entitlement and corruption of the American dream that seems to have connective tissue to the elite college admissions scandal that continues to play out.

The film made its debut September 8 at the Princess of Wales Theatre in TIFF’s Special Presentations section. Some buyers felt it wasn’t flashy enough, but it was very clear that the film would emerge with the festival’s largest deal, not counting the one that Fox Searchlight made on the eve of Toronto for The Personal History of David Copperfield, a film that will come out next year. The rest of the festival produced on average a solid deal each day, as buyers were clearly wary after the eight-figure sums paid for Sundance movies that didn’t pan out at the box office.

While most of the Toronto films were in the low-seven figures, there are good movies that found distribution homes, from the Bleecker Street-bought Military Wives to the Amazon-bought Sound of Metal to the likes of Greed, Lyrebird and The Burnt Orange Heresy. Film financiers didn’t get the numbers they hoped for, but there is less pressure on these and other films to perform, and backend upside if they do excel in their box office runs.

Bad Education is a co-production between Automatik and Sight Unseen, produced by Fred Berger, Eddie Vaisman, Julia Lebedev, Brian Kavanaugh-Jones, Oren Moverman, and Mike Makowsky, with Leonid Lebedev and Caroline Jaczko the exec producers.

CAA Media Finance and Endeavor Content brokered the Bad Education deal.