Mehcad Brooks, who portrays James Olsen on Supergirl, is leaving the CW series in its upcoming Season 5.

According to Entertainment Weekly, Brooks is leaving the series to shift his attention to work on feature films, developing a cable series and writing a book.

“We love Mehcad and we’re sad to see him leave the show as a series regular, but we’re excited for both Mehcad and James Olsen’s future,” showrunners Robert Rovner and Jessica Queller said in a statement to EW.

RELATED: Supergirl's New Costume Revealed in Behind-the-Scenes Photo

In the same way that his comic book counterpart, Jimmy, is famously Superman's pal, Olsen has been one of Supergirl's most reliable allies since the series began in 2015.

Over the course of the series, Olsen has gone from intrepid Daily Planet photographer searching for a fresh start to the acting CEO of CatCo, an international media conglomerate. He's also suited up as the heroic Guardian since Supergirl's second season.

While it's not clear how exactly Olsen will be written off, Brooks will reportedly exit the series at some point in the first half of Season 5.

RELATED: Batwoman and DC's Arrowverse Heroes Strike a Pose on EW Covers

“He’ll always be a part of our Supergirl family," said the showrunners' statement. "And we look forward to James returning to National City at some point to visit his sister and his super friends.”

After Brooks departure, another one of Supergirl's former allies, Jeremy Jordan's Winn Schott, will reportedly return for three episodes in the second half of Season 5. Since Supergirl will likely find herself in the Crisis on Infinite Earths crossover without one of her most trusted allies, she'll need all the help she can get.

Returning Sunday, October 9 at 9 p.m. ET/PT on The CW, Supergirl stars Melissa Benoist as Kara Danvers, David Harewood as Martian Manhunter, Mehcad Brooks as Jimmy Olsen and Chyler Leigh as Alex Danvers.