Actress Salma Hayek said Wednesday that disgraced Hollywood mogul Harvey Weinstein threatened to shut down production of her dream movie, "Frida," unless "I agreed to do a sex scene with another woman."

"And he demanded full-frontal nudity," Hayek wrote in an op-ed for The New York Times. "It was clear to me he would never let me finish this movie without him having his fantasy one way or another. There was no room for negotiation. I had to say yes."

Salma Hayek at the Cannes Film Festival in France in May 2015. Pascal Le Segretain / Getty Images file

Hayek, 51, said she was motivated to tell her harrowing story about the man she refers to as "my monster" by the flood of women who have come forward with accusations of sexual misconduct against Weinstein.

Weinstein has denied all allegations of non-consensual sexual encounters. A spokesperson said Wednesday night that Weinstein "does not recall pressuring Salma to do a gratuitous sex scene with a female costar and he was not there for the filming."

The spokesperson said a nude scene that was shot with the actress Ashley Judd was necessary because "that was part of the story, as Frida Kahlo was bisexual."

"All of the sexual allegations as portrayed by Salma are not accurate and others who witnessed the events have a different account of what transpired," the spokesperson said.

Related: Time's Person of the Year is "The Silence Breakers"

"Frida," which Hayek produced and starred in, was a critical success that turned the Mexican actress into a Hollywood player and won two Academy Awards for Weinstein's company, Miramax.

"I had brainwashed myself into thinking that it was over and that I had survived," Hayek wrote. "When so many women came forward to describe what Harvey had done to them, I had to confront my cowardice and humbly accept that my story, as important as it was to me, was nothing but a drop in an ocean of sorrow and confusion.

"I felt that by now nobody would care about my pain — maybe this was an effect of the many times I was told, especially by Harvey, that I was nobody."

Ashley Judd and Salma Hayek in the movie 'Frida.' Miramax / Courtesy Everett Collection

Hayek, best known for her turns in movies like "Desperado" and "Fools Rush In," did what she called the "senseless scene" in the 2002 biopic about the painter Frida Kahlo with Judd, who also has accused Weinstein of sexual misconduct.

Before she succumbed to Weinstein's alleged demand, Hayek wrote that he stalked her, that pressured her for sex and that he allegedly made other inappropriate demands backed up by threats.

"I will kill you, don't think I can't," Weinstein reportedly said, according to Hayek.

Related:Here's a growing list of men accused of misconduct

Hayek said she was able to rebuff Weinstein until he threatened her movie.

Hayek said that when she arrived to shoot the scene with Judd, she was a wreck and needed to take a tranquilizer to get through it.

"It was not because I would be naked with another woman," she wrote. "It was because I would be naked with her for Harvey Weinstein."

The scene stayed in the final cut of the movie.

Weinstein was fired in October by the studio he founded after a flood of women came forward with accusations of sexual harassment that go back decades. He is being investigated by authorities in New York City, Los Angeles and London, NBC News has confirmed.

Salma, I’d heard whispers for years. I’m so sorry they were true. All we wanted to do was create art and put food on the table. That’s it. Instead, we got the Monster from Hell. We deserved so much more from those we paid to protect us. Love to you. https://t.co/AjYwIpoVTX — rose mcgowan (@rosemcgowan) December 13, 2017

After her letter appeared, Hayek got a shout-out of support from the actress Rose McGowan, who has accused Weinstein of rape.