The country music drama had been on the air for four seasons while the Joan Allen-led mystery series was in its freshman year. 'Galavant' was in its second season.

ABC is leaving Nashville.

The network has canceled the country music drama after four seasons, as well as the freshman mystery series The Family and sophomore series Galavant, The Hollywood Reporter has confirmed.

Nashville starred Connie Britton, who also produced the series, and Hayden Panettiere, who took a leave of absence from the series earlier this season.

The drama was one of the few not included in ABC's 15-show renewal spree back in March, and also one of the network's only dramas from an outside studio (Lionsgate). However, the country music series' cancellation was still somewhat surprising. The series enjoyed a sizable DVR boost, up to a 1.9 rating among adults 18-49, and enjoyed ancillary profits from soundtracks and concert tours.

The primetime soap was set to hit its 100th episode next season, and had lined up respected writers Marshall Herskovitz and Ed Zwick (My So-Called Life, thirtysomething) as new showrunners for season five. One complicating factor? An anti-LGBT law recently passed in Tennessee, where the show filmed, that castmembers including Britton had spoken out against.

Clare Bowen, Charles Esten, Jonathan Jackson, Sam Palladio, Chris Carmack, Lennon Stella, Maisy Stella, Will Chase and Aubrey Peeples also starred. The series saw its cast change several times over the years. Eric Close, who played Britton's former TV husband, was written out at the end of season three, and Oliver Hudson's character Jeff Fordham was killed off at the beginning of this season. Former series regulars Robert Wisdom and Powers Boothe also departed the series early in its run. At least one regular has another TV gig already lined up: Palladio is set to appear in the second season of sci-fi drama Humans.

The Family, from Shondaland grad Jenna Bans, was one of the most buzzed-about scripts last pilot season and started out strong when it was sampled during ABC's prized TGIT block. However, the drama starring Joan Allen fell swiftly after it moved to its regular Sunday slot. The serialized mystery drama, produced in-house at ABC Studios, averaged a modest 1.4 among adults 18-49 and failed to generate buzz. (And reviews didn't help.) Although the series had not yet premiered when ABC handed early renewals to 15 other series, including six dramas, the pickups did not leave much room on the schedule for late arrivals.

ABC's fairy-tale musical comedy Galavant has been plagued by a number of behind-the-scenes exits (and possibly one onscreen) in its second season. Arguably the show's biggest supporter, former entertainment president Paul Lee, is no longer at the network to cheer on the series, which pulls an unimpressive 0.9 among adults 18-49. And to make matters worse, creator Dan Fogelman left ABC Studios for a lucrative overall deal with 20th Century Fox Television — where he has pilots for NBC and Fox in contention — and series lead Joshua Sasse has signed on to star in The CW pilot No Tomorrow, which was picked up to series Thursday — in first position.

Nashville, which airs Wednesdays, has two new episodes left to air, including what will be its series finale on May 25. The Family's series finale airs Sunday. Galavant's second season wrapped in January.

Keep up with all the renewals, cancellations and new series pickups with THR's handy scorecard and follow the pilot crop status here. For full upfronts 2016 coverage, go to THR.com/upfronts.