If “Behind the Candelabra” is really Steven Soderbergh’s final film, he’s going out on a high note.

His first stroke of genius: Casting Michael Douglas as Liberace. The gritty actor may sound like an unlikely choice to play one of America’s most flamboyant entertainers, but Douglas specializes in charming manipulators, which is exactly what the famed pianist is in Richard LaGravenese’s sharp script.

Greed, in Liberace’s world, is good.

The film tracks his secretive five-year affair with the much-younger Scott Thorson (Matt Damon), a foster-home child whose only association with show business is training dogs for B movies. Slowly but surely Liberace seduces his prey with hot-tub sessions, endless rounds of champagne, rhinestones and breakfast in bed. Eventually, the pianist starts dressing his “baby boy” in his image and even convinces him to undergo plastic surgery to make the resemblance even stronger.

Damon brings the right amount of wonder and naiveté to his role, although at 42, he’s a bit long in the tooth to portray the 18-year-old Thorson. The character’s destruction may have been even more horrifying if Soderbergh had cast an actual teenager, but let’s not quibble too much. We just hope Soderbergh will renege on his retirement and continue to make thought-provoking films.