“Gotham” has found its Detective James Gordon.

Fox and Warner Bros. TV have tapped Ben McKenzie to star in “Gotham,” casting the “Southland” alum as a young version of DC Comics’ famed Commissioner Gordon.

Fox topper Kevin Reilly announced at the net’s winter TCA session that “Gotham” will feature the origin story of Gordon along with Gotham City’s notable villains. A young Bruce Wayne will also be featured, as “Gotham” follows Wayne from his pre-teen years to the moment when he puts on the Batman cape for the first time.

Bruno Heller penned the pilot script for “Gotham,” which has a series commitment at Fox. He will exec produce with Danny Cannon, who also helmed the pilot.

McKenzie is no stranger to the Fox family, as the thesp landed his breakout role on the net’s sudsy drama “The O.C.” McKenzie also has experience working in the Batman universe, having voiced Bruce Wayne/Batman in 2011 animated pic “Batman: Year One.”

The actor is repped by CAA, Management 360 and PJ Shapiro, Ziffren and Brittenham.