The longtime Fox News host says she rebuffed sexual advances and also suffered gender discrimination from 'Fox & Friends' co-host Steve Doocy. In a statement, Ailes fires back: "This defamatory lawsuit is not only offensive, it is wholly without merit and will be defended vigorously."

Gretchen Carlson, a broadcast veteran, claims in a sexual harassment lawsuit that she was let go from Fox News on June 23 as retaliation for rebuffing Roger Ailes' sexual advances.

The lawsuit, filed Wednesday in New Jersey Superior Court, states that her contract expired and that despite working at Fox News for 11 years and being the host of a show that was leading in its afternoon time slot, she was unfairly terminated as the result of events that had occurred much earlier.

According to the complaint, "When Carlson met with Ailes to discuss the discriminatory treatment to which she was being subjected, Ailes stated: 'I think you and I should have had a sexual relationship a long time ago and then you'd be good and better and I'd be good and better,' adding that 'sometimes problems are easier to solve' that way. Carlson rebuffed Ailes' sexual demands at that meeting, and nine months later, Ailes ended her career at Fox News."

21st Century Fox released a statement on Wednesday, saying: "The Company has seen the allegations against Mr. Ailes and Mr. Doocy. 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."

Carlson, who worked at CBS on its Saturday morning show, joined Fox News in 2005. She has interviewed many prominent politicians and celebrities and spent seven-and-a-half years as a co-host on Fox & Friends. Most recently, she's been leading the program The Real Story With Gretchen Carlson.

In 2009, Carlson says she complained to a supervisor that Steve Doocy, one of her co-hosts on Fox & Friends, "had created a hostile work environment by regularly treating her in a sexist and condescending way, including by putting his hand on her and pulling down her arm to shush her during a live telecast."

Carlson accuses Doocy of "severe and pervasive sexual harassment" off the air and "generally attempting to put her in her place by refusing to accept and treat her as an intelligent and insightful female journalist rather than a blond female prop."

But complaints about Doocy (who isn't named as a co-defendant) allegedly went nowhere.

"After learning of Carlson's complaints, Ailes responded by calling Carlson a 'man hater' and 'killer' and telling her that she needed to learn to 'get along with the boys,'" states the complaint, which adds that her gripes led to her being assigned fewer hard-hitting political interviews.

She says she was fired from Fox & Friends in 2013, and after being reassigned, claims she was tormented by Ailes' sexual comments and innuendo. Ailes allegedly told her that she saw everything as if it "only rains on women" and admonished her to stop worrying about equal treatment and getting "offended so God damn easy about everything."

Ailes also ogled Carlson in the office, adds the lawsuit, and "asked her to turn around so he could view her posterior," urging her to wear certain outfits that enhanced her figure.

Other Ailes comments such as "I'm sure you can do sweet nothings when you want to" led to a meeting in September 2015, continues the complaint, which was the scene of a more explicit invitation for a sexual relationship. Carlson says she refused, and as a result, according to the lawsuit, her compensation was cut, her appearances on the network were curtailed and she was blocked from having social media and public relations support.

Carlson is now suing for compensatory damages for what has happened to her career, damages for mental anguish, punitive damages and more. She is represented by Nancy Smith at Smith Mullin.

For the second quarter of 2016, Carlson still easily won her time slot among cable news shows — but, at 1.15 million viewers and 183,000 adults 25-54, she ranked an admittedly mediocre No. 14 among all FNC programs.

On Wednesday afternoon, Ailes released the following statement: "Gretchen Carlson's allegations are false. 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. When Fox News did not commence any negotiations to renew her contract, Ms. Carlson became aware that her career with the network was likely over and conveniently began to pursue a lawsuit. Ironically, FOX News provided her with more on-air opportunities over her 11-year tenure than any other employer in the industry, for which she thanked me in her recent book. This defamatory lawsuit is not only offensive, it is wholly without merit and will be defended vigorously."

July 6, 3:40 p.m. PT: Updated with Fox, Ailes statements