It was one of the season's best-kept secrets: Upon its spring return, CBS had billed The Good Wife's first three episodes back as an "event," going so far as declaring it the show's "most shocking moment -- ever." That "shocking moment" came Sunday, when the show said goodbye to a main castmember.

[Warning: Major spoilers ahead.]

Attorney Will Gardner (played by Josh Charles, who has effectively been the show's male lead)was shot in the courtroom by his client, the unhinged Jeffrey Grant (Hunter Parrish), before being declared dead in the hospital.

His surprising death in Sunday's episode, "Dramatics, Your Honor," came as a shock to viewers, as the character of Will has been an integral centerpiece for The Good Wife, first acting as Alicia Florrick's(Julianna Margulies) superior at Lockhart/Gardner, then a lover before becoming an adversary. In fact, several trending topics on Twitter on Sunday evening were devoted to The Good Wife, "Will Gardner" among them.

Will's unexpected death and Charles' departure comes at a time when The Good Wife has been creatively rejiggering its story. Early in the season, Alicia and counterpart Cary Agos (Matt Czuchry) broke off from Lockhart Gardner to form their own law firm, Florrick Agos.

Sending out all my love to #TheGoodWife fans! Playing Will Gardner was an honor and a pleasure. Thanks for all of your support & kind words!

Charles, for his part, has received notices for his Good Wife turn, snagging a Golden Globe nomination earlier this year and an Emmy nomination in 2010, as well as SAG Award recognition as part of the seasoned ensemble cast. Expect Charles to address his departure on Monday's Late Show With David Letterman.

The Good Wife marks the latest CBS drama to kill key characters in the middle of the 2013-14 season. Person of Interest killed off Agent Carter (series regular Taraji P. Henson) and The Mentalist closed out the long-running Red John mystery by killing off the character midway through.

CBS entertainment chairman Nina Tassler was vocal about the changing landscape in serialized television shows, where the act of killing off major characters was once reserved for finales. "Years ago, you would never, ever kill a major character. And the rule was, if it ain't broken, don't fix it," Tassler said at winter TCA in January. "I think that's a reflection of how much we've changed, how much the business changes and really supporting the producers and getting behind the creative changes that they want to make, albeit sometimes very dramatic."

The Good Wife fans: Were you caught off guard by the loss? Tell us in the comments, and take THR's poll below.