Rachel Bloom and Adam Pally will star in the comedy “Most Likely to Murder” for Lionsgate.

Dan Gregor, who works as a writer and consulting producer with Bloom on her CW series “Crazy Ex Girlfriend,” will direct the film from a script he co-wrote with Doug Mand, his writing partner on “Crazy Ex Girlfriend” and “How I Met Your Mother.” Mand will also appear in the movie, which starts production in New York in March.

Pally will portray a man — once the most popular student in high school — who returns to his hometown 10 years after graduating to find that the girl he still likes is now dating the former high school outcast. When the outcast’s mother dies under mysterious circumstances, he tries to prove she was murdered.

Pally and Bloom will produce, along with Petra Ahmann. Gregor and Mand are executive producers.

Lionsgate made the acquisition through its digital studio, which had made first-look deals with digital influencers, such as Grace Helbig and Hannah Hart, and produced the film “Dirty 30” and the Hulu series “Dimension 404.”

Bloom’s “Crazy Ex-Girlfriend” was recently renewed for a third season. She won a Golden Globe this year for best actress in a TV series, comedy or musical. Pally’s credits include “Happy Endings” and “The Mindy Project.”

Bloom and Pally are repped by UTA and 3 Arts. Gregor is repped by CAA and Kaplan/Perrone. The news was first reported by Deadline Hollywood.