Warning: Spoilers ahead.

Like the 8.9 million viewers who tuned into Sunday night’s episode of “The Good Wife,” the CBS legal drama’s creators and cast members are mourning the untimely death of a beloved character. Will Gardner, played by Josh Charles, was killed last night after being shot in court by his client Jeffrey Grant (Hunter Parrish).

Gardner and the rest of the cast talked about the episode shocker in a video on CBS.com (below). After the actor told showrunners Robert and Michelle King that he wanted to leave the series to pursue “the next chapter of (his) life both creatively and personally,” the Kings decided that disbarring him, marrying him off or shipping him to Borneo just wouldn’t suffice.

Star Julianna Margulies asked producers to keep Gardner on a bit longer to write his character off properly. The Kings said they decided to capitalize on the opportunity to shake up Alicia Florrick’s (Margulies) life.

“The reason we went this direction with the storyline was the hope that it would impact every area of her life,” Michelle King said in the video. “That kind of big loss is going to make you reconsider everything.”

Robert King said that killing Will off is slightly advantageous to the show.

“It gives Alicia that other plateau she has to reach and that challenge ’cause she’s best when she’s an underdog,” he said in the vid.

The husband-and-wife duo also penned a letter to their loyal fans (below) who were outraged by the devastating loss.

“To us, there always was a tragedy at the center of Will and Alicia’s relationship: the tragedy of bad timing,” the note read. “And when faced with the gut punch of Josh’s decision, made over a year ago, to move on to other creative endeavors, we had a major choice to make. … The brutal honesty and reality of death speaks to the truth and tragedy of bad timing for these two characters. Will’s death propels Alicia into her newest incarnation.”

“The turning point keep the show from slipping into a numbing sameness, and keep the characters fresh: because you see how they react to a completely new status quo,” they wrote. “Will’s death in many ways becomes a hub for the whole series, violently spinning everybody in new directions.”

Margulies, who said she cried when she heard the news, described her onscreen love interest-adversary as a “powerful aphrodisiac.”

“What it does to Alicia’s storyline is it makes her start to rethink everything,” Margulies said in the clip. “You’ve seen her through this whole journey of trying to stand up on her own two feet out of necessity and now I think she is going to look a little bit deeper inside herself rather than just be in survivor mode.”

Because they each carried so much baggage, Margulies said in a Facebook chat with fans that she never expected Alicia and Will to end up together.

“I think the reason everyone wanted Will and Alicia together was because they weren’t together,” she said on the social networking site.

She also shot down speculation that Alicia would soon run into another man’s arms: “It’s called THE GOOD WIFE! Not the GOOD SLUT!”

Margulies promised that Will would be seen and heard throughout next Sunday’s ep. “Next week’s episode was the hardest thing,” she told fans. It’s sure to be a tearjerker.

Christine Baranski, on the other hand, said her character Diane Lockhart will become more of an opportunistic survivalist like Will as she takes over his post.

“It was like my husband telling me he was going to leave,” she said in the CBS vid. “I just didn’t want to hear it. I’m still sad, very sad. I feel it as a loss of a family member.”

Here’s the Kings’ complete letter: