By Daniel Wiessner and Lisa Richwine

(Reuters) - Former Fox News anchor Gretchen Carlson sued Fox News Channel Chief Executive Roger Ailes on Wednesday for sexual harassment, alleging her ex-boss wrongfully fired her after she rebuffed years of unwanted advances.

Ailes, also the network's chairman, denied Carlson's allegations late on Wednesday. The parent of Fox News, 21st Century Fox, said it had begun an internal review of the matter.

Carlson, 50, charged in a lawsuit that Ailes, a former Republican political consultant who built Fox News into the most-watched U.S. cable news channel, took her off the morning show "Fox & Friends" in 2013 and cut her pay because she refused to have a sexual relationship with him.

Lawsuits alleging sexual harassment typically name the employer as a defendant, but Carlson’s lawyer, Nancy Erika Smith, said in an interview that she had no reason to believe Fox condoned or authorized Ailes' behavior.

Ailes was a consultant for several U.S. Republican presidents, including George H.W. Bush. He has been a confidant of 21st Century Fox Executive Co-Chairman Rupert Murdoch, who named Ailes founding chief executive of Fox News Channel in 1996.

Ailes said in a statement he would defend himself against "false" and "offensive" allegations.

"This is a retaliatory suit for the network’s decision not to renew her contract, which was due to the fact that her disappointingly low ratings were dragging down the afternoon lineup," Ailes' statement said. He added that Carlson had thanked him in a recent book.

The lawsuit filed in New Jersey state court accused the 76-year-old Ailes of wrongfully firing Carlson and before that "ostracizing, marginalizing and shunning her after making clear to her that these 'problems' would not have existed, and could be solved, if she had a sexual relationship with him."

The suit also alleged that her "Fox & Friends" co-host Steve Doocy treated Carlson as a "blond female prop," refusing to engage with her on air and belittling her contributions. Doocy was not named as a defendant in the lawsuit.

In a statement, 21st Century Fox said: "We take these matters seriously."

"While we have full confidence in Mr. Ailes and Mr. Doocy, who have served the company brilliantly for over two decades, we have commenced an internal review of the matter," Fox said.

RECORD RATINGS

Fox News Channel, known for a lineup of politically conservative commentators, is drawing record viewership. The network was the most-watched channel in all of basic cable television with an average of 2.2 million prime-time viewers, according to Nielsen data through June.

Ailes personally intervened when Republican presidential candidate Donald Trump made disparaging remarks about Fox News anchor Megyn Kelly. In January, Fox acknowledged that Ailes had three conversations with Trump ahead of a Fox News debate that the candidate skipped.

Carlson's lawsuit, which said she was fired on June 23, said her show achieved its highest ratings ever from October 2015 through March 2016. She is seeking damages for lost compensation, damage to her career and mental anguish. A Stanford University graduate and former Miss America pageant winner, she joined Fox News in 2005.

Carlson's lawyer, Smith, said that since the lawsuit was announced, she had heard from other women who worked with Ailes and had complaints about his behavior.

Depositions and court hearings could expose issues the channel would rather keep quiet, said Merrill Brown, who helped launch Fox News competitor MSNBC.

"The airing of what could be potentially really dirty laundry ... is something that anybody's boss, in this case Murdoch and his team, should be apprehensive about," said Brown, director of Montclair State University's School of Communication and Media.

But he said it would be "astonishing" if Fox ratings were hit in the midst of the presidential election campaign. "This is going to be an extraordinary several months," he said.

In 2005, Fox News agreed to pay $225,000 to settle a lawsuit by the Equal Employment Opportunity Commission that said a former advertising executive sexually harassed a production assistant. A year earlier, Fox News host Bill O’Reilly paid an undisclosed sum to settle a lawsuit by a former producer who said the top-rated anchor talked to her about sexual fantasies and masturbation.

In a June 2015 blog on The Huffington Post, Carlson wrote that she had been harassed early in her career and was speaking out for the first time. "I had no real power, and I was worried that people would blame me or consider me a troublemaker. Sound familiar?" she wrote.

The case is Carlson v. Ailes, New Jersey Superior Court, Bergen County, case number not immediately available.

(Reporting by Daniel Wiessner in Albany, New York, and Lisa Richwine in Los Angeles; Editing by Bernard Orr and Peter Cooney)