Musician Kid Cudi attend the premiere of Summit Entertainment's 'RED 2' at Westwood Village on July 11, 2013 in Los Angeles

Musician Kid Cudi attend the premiere of Summit Entertainment’s ‘RED 2′ at Westwood Village on July 11, 2013 in Los Angeles

*Fox’s upcoming “Brooklyn Nine-Nine,” which executive producers have labeled “Barney Miller” meets “The Wire,” has booked a guest appearance from rapper-actor Kid Cudi (aka Scott Mescudi).

Andre Braugher co-stars on the freshman comedy from “Parks and Recreation” duo Mike Schur and Dan Goor. It follows a diverse group of detectives at a New York precinct. Cudi will play Dustin Whitman, an ex-con that Jake (Andy Samberg) is convinced robbed a jewelry store. He’s slated to appear in the third episode of the season.

Producers noted during their time at the Television Critics Association’s recent summer press tour that Brooklyn lends itself to high-profile comedy guest stars, with Cudi becoming the latest to nab a role on the series. (“SNL’s” Fred Armisen appears briefly in the pilot.)

Cudi’s small-screen credits include “How to Make It in America” and “The Cleveland Show.”

“Brooklyn Nine-Nine” premieres Sept. 17 on Fox.