And that's the end of "Elementary," my dear Watson.

CBS announced that the upcoming seventh season of the crime procedural is its last.

The series, which debuted in 2012, put a modern spin on the Sherlock Holmes stories. Jonny Lee Miller starred as the grouchy but brilliant sleuth, while Lucy Liu played the gender-flipped Joan Watson. Together, they helped the NYPD solve crimes in New York City.

"Elementary" has been a reliable performer, if not a ratings mega-hit for CBS. The decision to wrap up the show was made when Season 7 was ordered and production is already complete, so fans will get a planned-out ending.

In the Season 6 finale, Sherlock and Joan moved to Baker Street in London. The 13-episode final season will reportedly take them back to New York at some point.

Executive producer Robert Hewitt Wolfe tweeted about the end of the series, thanking his cast and crew: