Sarah Treem, the showrunner of "The Affair", is speaking out in response to the "hostile work environment" allegations made against her and her show in a recent report.

The situation on set is reportedly why the series' lead actress, Ruth Wilson, left the show before its fifth and final season.

Sources involved with production told The Hollywood Reporter that Wilson was frustrated "with the nudity required of her" and "what she ultimately felt was a hostile work environment" and that Treem would “try to cajole actors to get naked.”

RUTH WILSON SAYS SHE'S 'NOT ALLOWED TO TALK ABOUT WHY' SHE CHOSE TO LEAVE 'THE AFFAIR'

In an op-ed essay written for Deadline, Treem explained her experience working behind the scenes on the Showtime drama.

“Unfortunately, not much of my perspective made it into the [THR] story,” she wrote, “nor the perspectives of many of the half dozen senior level producers, director and other key crew members who spoke up.”

(L-R) Actors Dominic West, Ruth Wilson, Maura Tierney, Joshua Jackson, creator/executive producer Sarah Treem and executive producer/director Jeffrey Reiner speak onstage during the 'The Affair' panel discussion at the Showtime portion of the 2015 Summer TCA Tour at The Beverly Hilton Hotel on August 11, 2015 in Beverly Hills, California.  (Frederick M. Brown/Getty Images)

She outlined disagreements she had with Wilson about the direction the show was taking her character, Alison, and why there were so many scenes that required her to be nude.

“On a continuous basis throughout Ruth’s time on the show, I tried to protect her and shoot sex scenes safely and respectfully,” Treem wrote.

'THE AFFAIR' BODY DOUBLE CLAIMS SHE WAS FIRED FOR OBJECTING TO BEING CALLED 'SEXYTIME'

“We didn’t agree on the choices of the character or whether or not a sex scene was necessary to advance the plot, but that is not the same thing as not respecting or supporting an actress’s need to feel safe in her work environment, which is something I always take incredibly seriously.”

Sarah Treem (L) and Ruth Wilson (R) (Getty/Reuter)

“I have given my entire professional life to confronting the patriarchy and celebrating women’s narratives through my writing. Yes, I know women can be chauvinists and there is misogyny among women, but that is simply not what happened here,” Sarah wrote. “When I asked for more help at the end of the first season because I was having difficulty being all things to all people and maintaining a creative vision, I was told I simply needed to be ‘more maternal.’ As in many things, it is very tough to be a woman and do this job," she added.

ELLEN POMPEO SAYS 'GREY'S ANATOMY' SET WAS SO 'TOXIC' SHE ALMOST QUIT THE SHOW

"I did not always agree with Ruth Wilson, but I did always have respect for her craft, her ability and her process and I tried to write her a character deserving of her immense talent. I know she’ll continue to tell the story of complex, multi-faceted, remarkable female characters for the rest of her long career. I plan on doing the same.”

In a statement to Fox News earlier this week, Showtime responded to THR's report: "At its core, Showtime has always prioritized the discovery and support of new talent, by providing an inclusive platform for original voices, and a safe environment for them to do their best work."

CLICK HERE TO GET THE FOX NEWS APP

"When confronted with a report of inappropriate behavior involving anyone within our offices or productions, we immediately initiate a process overseen by our compliance team in the case of our own shows, or in the case of series we license from others, we collaborate closely with the relevant production studio. In the instances that THR is referencing, appropriate and decisive action was taken," the statement concluded.