After leaving fans hanging for quite some time, NBC has finally renewed sitcom Trial & Error for a second season set to air this fall. The show will return in mid-season for a 10 episode run.

The series premiered in May of 2016 to an audience of 5.9 million, however viewership declined to only 4 million by the end of the first season. Despite mediocre ratings, Variety has reported that the show is a favorite of NBC Entertainment chairman Bob Greenblatt, which may have played a part in the show's renewal.

RELATED: NBC releases 2017 fall schedule, revives Thursday night ‘Must-See TV’

The series is a spoof on crime documentaries that follows the young New York lawyer Josh Segal, played by Nicholas D'Agosto, who embarks on his first big case to defend an eccentric poetry professor who has been accused of murdering his wife.

Trial & Error also stars Jayma Mays, Steven Boyer, Krysta Rodriguez, Sherri Shepherd and John Lithgow. The entire cast with the exception of Lithgow is expected to return in season 2, according to Deadline.

The show is written by and executive produced by Jeff Astrof and Matt Miller, along with producers Jeffrey Blitz, Warner Bros. Television, Barge Productions and Good Session Productions.