The Roman Catholic Diocese of San Bernardino is allowing a Palm Springs church to be featured in a biopic about flamboyant entertainer Liberace.

The diocese, which covers San Bernardino and Riverside counties, reached an agreement with producer Jerry Weintraub to allow Our Lady of Solitude Church to be used during the filming of an HBO movie about the gay man’s life.

“There was really a brief funeral Mass theme that was shot Aug. 21,” said John Andrews, a spokesman for the diocese. “It was one day of shooting.”

Andrews said he couldn’t comment on the financial details of the agreement to shoot the scene at the church at 151 W. Alejo Road.

Michael Douglas portrays Liberace, who died of AIDS in 1987.

Steven Soderbergh is the director of the film, which takes its name from the 1988 book “Behind the Candelabra,” written by Scott Thorson, who claims that at 18 years old he became the then-57-year-old Liberace’s lover and confidant, and that they were together from 1977 to 1982.

Publisher’s Weekly describes the book as a “sorry, seamy tale” of Thorson’s “callous eviction from the performer’s Las Vegas penthouse in favor of a teenager and the public brouhaha that followed when he filed a palimony suit.”

Thorson’s book is also described as “uncomfortably candid with revelations about `Lee’ (Liberace), who was driven to experience sexual variety with younger males, even as he continued to publicly deny his homosexuality.”

Matt Damon plays the role of Thorson in the movie, the title of which recalls the trademark candelabra Liberace placed on his grand piano.