Jeffrey Neira, CBS
Julianna Margulies plays Alicia in "The Good Wife."

PASADENA, Calif. — At the end of the most recent original episode of CBS's "The Good Wife," Alicia Florrick (Julianna Margulies) was in shock. She'd just learned — in one of the worst ways possible, from an investigator after her husband's election as state's attorney — that husband Peter (Chris Noth) once slept with her friend, Kalinda (Archie Panjabi), well before Alicia and Kalinda became co-workers.

Alicia gripped a door, the blood draining from her face. She left her husband's victory celebration as tears began to fall. Alicia felt the same sucker punch viewers experienced a few weeks earlier when they were let in on the long-simmering secret.

Executive producers Michelle and Robert King have said they'd been planning that revelation since the start of the series. Indeed, it was long ago established that Kalinda once worked as an investigator for the state's attorney's office during Peter's previous tenure (before his sexcapades with a hooker and a jail stint that kicked off "The Good Wife"). The Kings said CBS executives encouraged them to delay the revelation until the audience had invested in the Alicia-Kalinda friendship, allowing the betrayal to have greater impact.

This week's episode (9 p.m. MDT tonight), written by the Kings, will deal with the fallout from Alicia's discovery while also welcoming the return of rival attorney Patti Nyholm (Martha Plimpton, "Raising Hope") for the legal case of the week.

That's the beauty of "The Good Wife": It offers a stand-alone courtroom case but pairs it with the ongoing personal-relationship stories of the show's characters. In a television universe where too many shows fall strictly into one genre or the other — procedural ("Law & Order") or serial ("Lost") — "The Good Wife" finds a comfortable middle ground.

The way viewers watch television today makes the show's balancing act necessary.

"People watch TV differently now," Robert King said. "They either watch one episode (at a time) or they'll get the DVDs and watch it all in one go. It was very complicated the first year, because we were still trying to negotiate with ourselves what the show was."

Margulies said that initially "The Good Wife" had a "you're a procedural show" vibe that didn't fit with a series whose premise was about a wife who stands by her unfaithful politician husband as he acknowledges his failings.

"It has a procedural backdrop, which, I think, makes people feel comfortable on network (TV)," she said. "But I am incredibly proud of the fact that I feel like it's changing."

At a January CBS press conference for the show, Margulies said she did not know the outcome of Peter's election — and she didn't want to know. But the Kings acknowledged they'd settled on a winner but pushed the story deeper into the season than they initially intended.

"What we probably did was slide it a little more because we found we were enjoying Anika Rose, who plays (Wendy Scott-Carr)," King said. "And we're always enjoying Titus Welliver, who plays (Peter's political rival Glenn) Childs."

Pushing the election forward also allowed them more opportunities to play the question of how Alicia feels about the potential outcomes. It was not always clear she wanted Peter to win. Indeed, the last episode showed Alicia voting but not the candidate she chose.

"Peter's win or loss will affect Alicia and does she want him to win, is she afraid that that win returns him to a world that she put behind happily?" King said.

As with any fictional TV show, the backdrop may not always resemble reality to viewers who work in that same arena every day. Michelle King said "The Good Wife" has three lawyers on the writing staff and a lawyer tech adviser.

"It's always that balancing act of trying to get it right and still be dramatic," she said.

"We'll fall on the sword on that because usually they'll say, 'Oh, well, that rarely happens.' We'll say, 'All right. It's TV. Let's try it and see,' " Robert King added. "It's always about putting characters in extreme circumstances."

Even Margulies hears critiques of the show's legal maneuvers at home.

"My husband is a lawyer, and the first time he saw it — he wasn't a big television watcher — he's like, 'Well, that case would have taken months.' And I said, 'You're absolutely right. And then again, we have 42 minutes.' And that's our artistic license as storytellers on television."

Dist. by Scripps Howard News Service