"Winning Time: The Rise of the Lakers Dynasty" will go down as the project that sunk one of Hollywood's most fruitful relationships.

After watching eight of the 10 episodes, the first of which premieres at 8 p.m. Sunday on HBO, I'm betting it'll also be remembered as a goofy, gutsy masterpiece.

Executive producer Adam McKay was well aware that his former "Saturday Night Live" writing partner Will Ferrell desperately wanted to play this series' lead: Jerry Buss, the flamboyant owner who saw himself as the NBA's version of Hugh Hefner. But McKay stiffed his longtime collaborator, opting instead to cast John C. Reilly.

McKay admitted in a recent Vanity Fair article that he mishandled the situation and has apologized, but Ferrell isn't taking his calls. It's unlikely that the pair, who co-produced everything from "Anchorman" to "Succession," will be splitting fries at the Ivy anytime soon.

You can see why Ferrell coveted the role; he specializes in playing characters who refuse to grow up. But it doesn't take long to see why McKay preferred his other star from "Step Brothers."

In films ranging from "Chicago" to "Stan & Ollie," Reilly carries the whiff of a loser. You just know he's bound to fail. That screen history is the perfect fit for this story.

When Buss gambled everything he had (and then some) to purchase the Lakers in 1979, experts expected the squad to remain a bridesmaid. Star Kareem Abdul-Jabbar seemed to be saving his energy for martial arts movies. Despite drafting Magic Johnson, the team seemed destined to lose once again to the Boston Celtics, who had just added rookie Larry Bird to its roster.

And then came an incredible streak of bad luck. Right before the start of the season, hothead coach Jerry West (played by Jason Clarke) blew one gasket too many and stepped down. His replacement, Jack McKinney (Tracy Letts), was sidelined after a near fatal bike accident. The team's bookkeeper — Buss' mom — made major financial errors.

But you never stop rooting for the Lakers. The affection starts with Reilly. He may look foolish eating lobster in nothing but a Speedo or unbuttoning his loud shirts down to the navel, but his optimism never goes out of style.

He reinforces our support by often speaking straight into the camera, conspiring with the viewers. I may be a blowhard, he seems to say. But I'm your blowhard.

McKay has a gift for casting the right actors in the right roles. It's the main reason his latest feature, "Don't Look Up," snagged an Oscar nomination for best picture. That talent also pays off here.

Quincy Isaiah perfectly captures Johnson's enthusiasm and drive. As Celtics coach Red Auerbach, Michael Chiklis chomps on cigars with the ferocity of a Batman villain. Jason Segel is so dedicated to his role as the Lakers' insecure replacement coach Paul Westhead, it's a wonder he doesn't slip on his own flop sweat. Other stars suiting up include Adrien Brody and Sally Field.

Johnson and the NBA have signaled that they're not wild about how they come across. That's understandable. No one here is a saint. Even though you're in Buss' corner, you'll cringe when he turns a tender moment with a nurse into a gross sexual act.

But those interested in either smart satire or sports will be riveted. For fans of both, this may end up being the most winning TV event of the year.