Fox has canceled “Prodigal Son” after two seasons, Variety has learned.

The news comes ahead of the second season finale, which is scheduled to air on May 18. That episode will now serve as the series finale. An insider with knowledge of the situation characterized the move to cancel the series as a difficult one, but went on to say that the show’s ratings did not justify a third season.

The series follows Malcolm Bright (Tom Payne), a criminal profiler with a rare talent for getting inside the minds of killers. He learned how they think because his father, Dr. Martin Whitly (Michael Sheen), was a notorious serial killer known as “The Surgeon.” Now he’s using his twisted genius to help the NYPD solve their most puzzling murders.

The series also stars Lou Diamond Phillips, Aurora Perrineau, Frank Harts, Keiko Agena, Halston Sage, Bellamy Young, and Catherine Zeta-Jones.

Chris Fedak and Sam Sklaver created the series and also serve as executive producers, showrunners and writers on the show. Greg Berlanti and Sarah Schechter also serve as executive producers via Berlanti Productions. “Prodigal Son” is produced by Berlanti Productions in association with Warner Bros. Television and Fox Entertainment.

The cancellation comes ahead of Fox’s upfronts presentation on May 17. Heading into the annual event, the broadcaster has already made a number of series pickups. The most recent is the single-cam comedy “Pivoting.” Last week, the network ordered the drama “The Cleaning Lady” starring Elodie Yung and the county music drama “Monarch.” Other pickups include the dramedy series “The Big Leap,” an animated comedy set in ancient Greece from Dan Harmon, the drama “Our Kind of People” from Karin Gist and Lee Daniels, and the mockumentary series “This County.”