A former "Desperate Housewives" actress took her ex-employer to court, claiming unfair dismissal from the hit TV series about lust and scandal in Wisteria Lane.

Nicollette Sheridan claims she was fired for complaining that the show's creator, Marc Cherry, slapped her on the head during rehearsals for a scene in September 2008.

The 48-year-old actress featured in five seasons of the ABC series, before her character Edie Britt was written out of it a few months after the slapping incident -- she claims in retaliation for her complaint.

Cherry's lawyers claim he had already decided to drop her character in May 2008, four months before the incident -- but Sheridan says she was assured in 2007 that her character would continue for the duration of the show.

"We know Edie's character is one we definitely won't be killing off," Cherry said, according to Sheridan, the first witness to take the stand in the trial Thursday.

Sheridan filed a lawsuit in April 2010, alleging battery and wrongful terminal of employment against Cherry and Touchstone Television Productions, which makes the show.

The actress told the Los Angeles Superior Court that she wanted a funny line to remain in the script, but Cherry resisted because it included part of a Beatles song, for which the studio would have to pay royalties.

While discussing the line, Cherry shouted: "What is it that you want?," said Sheridan, who at times struggled to maintain her composure.

When she tried to respond, "Mr. Cherry stepped toward me and he took his right hand and he hit me upside the head," she said, her voice breaking. "It was a nice wallop."

Defense attorney Adam Levin said Cherry simply tapped Sheridan on the head, trying to give her directions for the next scene. But Sheridan denied this, and re-enacted the scene with her lawyer Patrick Maloney in court.

"I was stunned, I could not believe he just hit me in the head. I could tell he was stunned," she said. "I told him, 'You just hit me in the head, that is not OK'."

"It was shocking, it was humiliating, it was demeaning. It was unfathomable that I had just been hit by my boss."

She retired to her trailer, and after some time Cherry came to apologize, she said, quoting him as telling her: "I am on bended knee begging your forgiveness."

Several of her former cast mates, including Eva Longoria, Marcia Cross, James Denton and Felicity Huffman, are expected to appear as witnesses to defend Cherry at the trial.

"Desperate Housewives," about lust, gossip, and foul play in a pampered American suburb, is to take its final bow at the end of its current eighth season.

The show, watched by 12 million people last season less than half the first season peak, helped turn around ABC's flagging fortunes and boosted the international market for US series with complex plots and one-hour episodes.