Peace generally prevails in television's fairy-tale world of sitcoms, soap operas and dramas.

But several TV shows are incorporating the War on Terror into their storylines.

"Days of Our Lives" (search), "Las Vegas" (search) and "Law and Order" (search), all on NBC, have characters who have been involved in the war in Iraq and Afghanistan — or something resembling it. And one new program, FX's "Over There," (search) is actually about soldiers fighting in Iraq.

"On the one hand, you want to ignore it. You're watching TV as entertainment and are trying to get away from reality," said Gary Scott Thompson, executive producer and creator of "Las Vegas." "But on the flip side, you have to at least mention that this is going on if your show takes place today."

But other shows — like the terrorism-themed dramas "24" (search) and "Alias" (search) — have avoided directly mentioning or even alluding to the continuing conflict in their plots.

So why are some TV producers tackling the ongoing war head-on, while others are pretending it's not happening?

Often, it's sheer practicality that has spawned the military-themed storylines. The soap opera "Days of Our Lives" and the prime-time dramedy "Las Vegas" both have characters who are U.S. Marines — so avoiding the war wasn't a viable option. In both shows, the characters are called to duty overseas.

On "Las Vegas," protagonist Danny McCoy — a former Marine played by Josh Duhamel (search) — was recalled to serve in Iraq at the end of the first season and returned a changed man at the beginning of the second, though he was never actually seen in combat.

One of Danny's friends, Luis, also got deployed and was killed in the line of duty.

"I set up Danny McCoy as a Marine, and given what was happening, there was no way he would not be recalled," said Thompson. "I felt there was no way to avoid that and still stay realistic. Even though we're a fun show, we are grounded in reality."

The program is now in its third season, with a focus on the aftereffects of the war on the main character.

On "Days," Philip Kiriakis — played by Kyle Brandt (search) — signed up for the Marines after Sept. 11 because he considered it his patriotic duty, and this past spring was deployed to the frontlines of the war.

The character engaged in battle in the desert (created using sand and bunkers on the set), was captured and taken hostage, said goodbye to his family in a video and lost his leg on a land mine before being discharged and sent home early this summer.

Before the soap wrote the deployment into the script, Brandt said the lack of reference to the war wasn't only frustrating for him, but viewers were growing impatient with the fact that his character was "sitting around going through the ins and outs of soap opera romance" instead of serving in the military.

"I would actually get comments and letters [asking], when is Philip going to go overseas, when is he going to serve?" Brandt said. "I was asking the same questions. So this storyline was the answer."

One episode of "Law and Order" focused on a reporter who was embedded with the military, traveled to Iraq with a soldier and broadcast the unit's movements on TV. The report got the troop attacked and killed by insurgents.

But other shows have dodged the subject, no doubt deciding it was far too controversial to take on.

"A lot of people feel this is such a dicey, contested territory, and they don't want to offend viewers, so they avoid it entirely," said Robert Thompson, director of Syracuse University's Center for the Study of Popular Television and no relation to the "Las Vegas" producer. "It gets so narratively messy, you don't know where to draw the line [between fact and fiction]."

In fact, both "Las Vegas" and "Days" met with resistance from NBC before persuading the network that the war story was the way to go.

"At first the network was cautious. No one else was doing it," said "Days" executive producer Ken Corday. "It was a very sensitive, slippery slope for NBC."

But Corday said he managed to convince the powers-that-be to go ahead with the plot.

"I thought it was important because it's going on out there," he said. "This was not a liberal or conservative approach. We're talking about a deployment of 300,000 of our brothers, sisters, children, parents. … We need to re-remind the American people that they're still there."

The soap opera approached the topic delicately to avoid offending viewers.

"We never, ever said that it was Iraq because of sensitivity," said Corday. "We never showed people of Iraqi descent or people with Iraqi accents. But it was scenes with a lot of sands, so that's obviously what we were doing."

Similarly, Gary Scott Thompson had to wrangle with network execs before he got them on board, because they didn't want to be perceived as making any statements about the war.

"It was a tough sell to the network — they said, you can't be making comments like this," he said. "I said, it's not a comment, it's the reality. Once I'd written the script and they'd looked at it, they knew what I was trying to do."

Perhaps the most daring war-related venture on television right now is the new FX series "Over There," which premiered last month. Rather than simply weaving the war into a single storyline, the show is all about Iraq and a small group of (fictitious) soldiers fighting there, as well as their families back home.

"It's the first show in American television about an ongoing war," said one of the executive producers and creators, Chris Gerolmo. "It's the story of what going off to war does to the people who are left behind and the kids who come back hurt or otherwise transformed by their experience."

But the show — which filmed its Iraq scenes in the desert in Chatsworth, Calif. — avoids getting into politics and focuses on the human experience of being at war.

"We're not writing about whether it was right or wrong to go to war. We're not writing about the question of whether the war should continue," Gerolmo said. "We're writing about these kids and how they get through the day and keep their asses intact."

He said and the other producer and creator, Steven Bochco, expect some outrage to crop up over the series.

"If there is a controversy about the show — and there is and will be — that just comes with the territory," said Gerolmo.

The trend of shows tackling a current war is a far cry from how entertainment TV handled Vietnam in the '60s, according to Robert Thompson.

"The philosophy of network television back then was you presented a parallel universe and ignored it entirely," he said. "You provided an anesthesia from all that was going on in the world."

The program "Gomer Pyle, U.S.M.C.," for example, was about a Marine and took place on a military base but never mentioned the Vietnam War.

"Days," "Las Vegas" and "Over There" have all consulted with the Marines in doing their war-themed storylines so as to be as accurate as possible within their fictional parameters. They've gotten positive feedback from real-life soldiers about the end result, their producers say, but reaction from viewers has been mixed.

"The responses were more from wives, children, parents of deployed soldiers," Corday said. "Either they didn't want to see this depicted or they wanted it done truthfully."

In spite of the potential for controversy, TV producers incorporating the war into their shows believe strongly in their decision to do so.

"We're trying to be realistic about the war and the human consequences of war," "Over There"'s Gerolmo said. "We're going to bring you a visceral and gut-wrenching interpretation. I believe in the power of stories to illuminate morally complicated situations. That's why we're doing what we're doing."

FX is owned by News Corp., the parent company of FOXNews.com.