After a bevy of problems — a director who quits on the first day of production, a series of cast changes, conflicting script approvals, legal battles and the loss of a distributor — the Weinstein Company premiered Western drama “Jane Got a Gun” at the Museum of Modern Art in New York on Wednesday evening. Natalie Portman, who produced the film and stars as the title character, Jane Hammond, made a grand entrance at the intimate screening presented by the Cinema Society — where she admitted to Variety that the production was “stressful,” but has made her a “stronger and braver” filmmaker.

“This was the most challenging movie I’ve ever been a part of. There was an obstacle every hour, every day,” Portman, 34, told Variety on the red carpet. “It was interesting that all the problems we went through were parallel to the obstacles that characters in the movie go through. You kind of want to run away and hide, but you have to face the difficulties and stand up for yourself and overcome the challenges, instead of wilt in the face of them. So it was definitely challenging for me, but this experience has only made me stronger.”

Trouble first began when director Lynne Ramsay (“We Need to Talk About Kevin”) abruptly quit on the first day of shooting in New Mexico in March 2013. She was set to helm the production with Portman playing a frontier woman who must turn to a former lover (originally Michael Fassbender) to seek revenge against the band of outlaws (led by Joel Edgerton) who killed her husband. Fassbender’s commitment to “X-Men: Days of Future Past” conflicted with “Jane’s” shooting schedule, and he had to bail. Soon, a revolving door of actors — Jude Law and Bradley Cooper — were considered, before the final cast fell into place. Edgerton ended up switching roles with Ewan McGregor, who joined the film to play the villain, and helped bring in his “Warrior” director Gavin O’Connor to preside over the film. The Aussie actor also co-wrote the film’s new script to work out some kinks.

“I’m not a quitter. I don’t like to consider myself as a quitter, and I felt like I had to do something,” Edgerton, 41, told Variety about shepherding the film to completion. “When I sign on to a movie, I care about it so much. It’s not any easy thing to walk away. But there were a dozen occasions where I thought that the movie was dead in the dust,” he admitted.

So he took quick action: “We kept picking it up and slapping it in the face and telling it to soldier on. We did that because of the hard work we all put in. It really speaks to the testament and the nature of filmmaking — which is that, you have 40-plus people who are working for the same vision, and making great sacrifices every day in order for that vision to meet with an audience. There are so many things that can knock it down or trip it over, and we were faced with a lot of those things.”

The final hurdle Edgerton and the “Jane” filmmakers encountered was with the film’s distribution. Relativity Media was set to distribute the picture, but the company went bankrupt and gave up its rights to the film, leaving its future in jeopardy. Fortunately, the period drama was saved by the Weinstein Company, which will release the picture on Jan. 29.

“I bled emotionally for this movie,” Edgerton confessed. “It was the one of the hardest work experiences I’ve ever been through. We struggled to keep this movie afloat, so it’s a very happy experience to finally share it with everyone. If the movie fell down on its face and never got out, it would have been a very difficult experience. To reconcile all the tribulations that we endured and to be here tonight is a happy and proud moment.”

Portman, clad in a floral Valentino dress, echoed his sentiments. “I’m so proud of this movie,” she said. “I feel like I can do anything now. It’s kind of funny that Ewan, Joel and I directed our own movies after this one. When you make it through something so challenging like this, there’s a feeling of ‘I can do anything now.'”

After the screening, Edgerton joined his co-star Sam Quinn (Portman headed to the airport to catch a flight) at the swanky Skylark cocktail lounge located 30 stories up in the heart of Times Square for the movie’s after-party. There, Edgerton caught up with Australian actor Sullivan Stapleton, and later chatted with executive producer Harvey Weinstein. Before leaving the bash, the “Black Mass” star took some time to glance out of the floor-to-ceiling windows to enjoy the panoramic views of Midtown Manhattan and the Empire State Building.

Also at the party were “Crash” director Paul Haggis, actor Dean Winters and Isiah Whitlock Jr., who all noshed on the plentiful hors d’oeuvres and sipped on wine and Serpent’s Bite Whisky cocktails (with fitting names, like Wanted Dead or Alive, Jane’s Potion and The Shootout).