Gretchen Carlson, a longtime presence on Fox News Channel, said Wednesday she had filed a lawsuit alleging the top executive at the network, Roger Ailes, made sexual advances on her and ended her career at the 21st Century Fox-owned outlet after she rebuffed him.

A Fox News Channel spokesperson could not be reached for immediate comment.

Carlson, who was a co-anchor at “Fox & Friends” and who more recently anchored a daytime program, “The Real Story With Gretchen Carlson,” alleged in the lawsuit, filed in Superior Court of New Jersey, that she was removed from “Fox & Friends” in 2013 after she complained about behavior by co-host Steve Doocy, and was moved to an afternoon program as a way to diminish her presence at the network. Carlson alleged she was terminated on June 23 after her current contract elapsed.

“We believe that the evidence will confirm that Gretchen was fired from ‘Fox & Friends’ for speaking up about demeaning and discriminatory behavior on and off the set,” said Nancy Erika Smith, an employment litigator at Smith Mullin P.C., a Montclair, N.J., firm that is representing Carlson, in a prepared statement.

Carlson confirmed via Twitter that she is no longer with the network, which she joined in June 2005.

As you may have heard, I'm no longer with @FoxNews. I value your support and friendship so please stay in touch: https://t.co/R7JBTsvYSh — Gretchen Carlson (@GretchenCarlson) July 6, 2016

“Although this was a difficult step to take, I had to stand up for myself and speak out for all women and the next generation of women in the workplace,” Carlson said in a statement. “I am extremely proud of my accomplishments at Fox News and for keeping our loyal viewers engaged and informed on events and news topics of the day.”

The lawsuit threatens to draw more scrutiny to the most-watched TV-news network on cable, which has made headlines in recent months for the role it has played during the current election cycle. Fox News has battled with Donald Trump, the presumptive Republican candidate for U.S. president, and garnered attention for the way in which another prominent female anchor, Megyn Kelly, has drawn his ire during a televised debate among that party’s candidates. Allegations of a sexually charged environment at Fox News have surfaced in the past, such as in the recent Gabriel Sherman book, “The Loudest Voice in the Room,” an account of how Ailes built Fox News.

Carlson alleged she was fired after rebuking sexual advances by Ailes and after trying to challenge the way that male colleagues treated her. She alleged that Ailes propositioned her sexually after she met with him last September to discuss discriminatory treatment. In one of the most inflammatory accusations, Carlson alleged Ailes told her, “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. The lawsuit contends that in retaliation for Carlson’s complaints about the alleged harassment and discrimination, Ailes denied her “fair compensation, desirable assignments and other career-enhancing opportunities,” before eventually terminating her employment.

The lawsuit also cites alleged incidents involving Doocy, who allegedly “engaged in a pattern of severe and pervasive sexual harassment of Carlson, including, but not limited to, mocking her during commercial breaks, shunning her off air, refusing to engage with her on air, belittling her contributions to the show and generally attempting to put her in her place,” according to the suit.

In response to learning of Carlson’s complaints, Carlson’s lawsuit alleges, Ailes purportedly responded by calling Carlson a “man hater” and telling her she needed to learn to “get along with the boys.”

The lawsuit cites examples of Ailes’ alleged sexual and sexist comments, including claims that Ailes engaged in “ogling Carlson in his office and asking her to turn around so he could view her posterior,” “commenting repeatedly about Carlson’s legs,” and “claiming that Carlson saw everything as if it ‘only rains on women’ and admonishing her to stop worrying about being treated equally and ‘getting offended so God damn easy about everything.'”