Republican presidential candidate Newt Gingrich fired a torpedo at what he called "elite media" in the United States, accusing it of exploiting his ex-wife hours before Thursday's South Carolina primary debate.

Gingrich gave CNN's chief national correspondent John King, who hosted the debate, a fiery tongue lashing when he led with a question about allegations his ex-wife made earlier in day about him requesting an "open marriage" prior to his divorce in 1999.

"I think the destructive, vicious, negative nature of much of the news media makes it harder to govern this country, harder to attract decent people to run for public office and I am appalled that you would begin a presidential debate on a topic like that," he told King to loud applause.

"To take an ex-wife and make it two days before the primary a significant question in a presidential campaign is as close to despicable as anything I can imagine," he said amid cheers.

Gingrich added that his two daughters wrote the head of ABC, which released an interview with Marianne Gingrich hours earlier, stating the story was wrong and should be pulled.

He then lashed out at CNN for opening the debate with that kind of "trash."

When King countered that it wasn't CNN's story, Gingrich shot back angrily and said the cable network's staff made the decision to use it.

Gingrich once again refuted the story from his ex-wife.

"Every personal friend I knew in that period says the story is false. We offered several of them to ABC to prove it was false. They weren't interested," he said.

Gingrich then accused the "elite media" in the country of attacking Republican candidates while at the same time protecting Democratic U.S. President Barack Obama.

He received another standing ovation.

The other three candidates on the stage, Mitt Romney, Rick Santorum and Ron Paul, didn't challenge Gingrich on the open marriage subject.

The debate ended a big day on the Republican campaign trail with Santorum being declared winner of the Iowa caucuses more than two weeks after his apparent second-place finish to Romney.

Texas Gov. Rick Perry also dropped out of the race and put his support behind Gingrich.