Actor Steve Carell is set to replace Zach Galifianakis in a new film about a terminally-ill police woman's fight for gay rights.

The Hangover star was cast in Freeheld earlier this year (14), but he has dropped out due to a scheduling conflict, according to

The movie is based on the 2007 documentary of the same name, which centred on Laurel Hester, a New Jersey cop who challenged government officials and demanded pension benefits for her same-sex partner, Stacie Andree, as she battled lung cancer.

Julianne Moore will portray Hester, while Juno's Ellen Page will star as Andree.

Carell will play Steven Goldstein, an advocate for Garden State Equality, in the film.