The Jonny Lee Miller and Lucy Liu drama has been a cash cow for producers CBS TV Studios.


CBS' lowest-rated drama is ending.


The forthcoming seventh season of Elementary will be its last.


The series, which has been a bubble show for the past few seasons, has wrapped production on its final run of 13 episodes. The final season, which is set to air in 2019, will bring Elementary to its natural end. Production on the show starring Lucy Liu and Jonny Lee Miller wrapped Friday.


The Sherlock Holmes drama has been a cash cow for producers CBS Television Studios, with foreign sales and a Netflix deal helping to keep it running as long as it did. Despite dwindling linear returns, Elementary scored a 13-episode seventh season renewal in May, which ranked as one of the biggest surprise pickups of the 2018 upfront season.


Last year at this time, Elementary was left off the network's midseason schedule and held for late spring as a bridge between the end of the traditional broadcast season and into the summer programming, where ratings expectations were not as important. CBS ultimately handed out an additional eight-episode order to bring its total to 21, the first time the procedural didn't get a full 24-episode season.


With production having wrapped, sources note that the plan was to always end Elementary with season seven as contracts for stars Miller and Liu — both in-demand actors — were coming to an end. The show will conclude with an impressive 154 episodes. A premiere date for season seven has yet to be determined, as it was recently left off CBS' midseason schedule (for the second year in a row).


Elementary becomes the second CBS series to wrap its run in 2019, joining the comedy The Big Bang Theory (ending with season 12).


The network still has a deep roster of procedurals and has not renewed any of its in-season scripted originals for 2019. This year, CBS launched the Dick Wolf drama FBI and a reboot of Magnum P.I., and has the dramas The Code and The Red Line on deck for 2019.