One of the longest-running current comedies on TV was cancelled Friday: Rules of Engagement will air its last episode on CBS this season.

While never a critical favorite, the ensemble half-hour sitcom starring Patrick Warburton, David Spade and Megyn Price nonetheless gave CBS a workhorse — a show that could be used to fill holes in the schedule when weaker titles couldn’t earn high enough numbers.

Rules started and ended its run as a midseason replacement for the network and survived several rounds of cuts when odds-makers bet against the show returning. Not since Fox’s Til Death has a sitcom on-the-bubble pulled off so many narrow escapes. Rules still had semi-decent ratings this season — averaging a 2.6 among adults 18-49. But as a show ages, its costs tend to rise, which in turn adds more performance pressure.

The cancellation comes on the heels of CBS shedding a trio of drama titles: CSI: NY, Vegas and Golden Boy were all axed today.