EXCLUSIVE: All it took today to snatch the assets of The Weinstein Company back from a bankruptcy plunge was a 12-hour negotiating session, fueled by a common goal between New York Attorney General Eric Schneiderman, the remaining TWC board members Tarak Ben Ammar, Lance Maerov and Bob Weinstein, and Maria Contreras-Sweet and Ron Burkle. Latter will pay $500 million for the assets and relaunch a new company that will have a female-dominated board, and that will keep the existing employees, set aside $90M for a fund for victims of Harvey Weinstein, and pay off the considerable debt the company has incurred.

The goal?

“We all worked around the clock, and it was important to us that this was settled prior to the industry’s most important event, the Oscars,” said Ben Ammar. “And the message was that Harvey Weinstein could have destroyed the assets of this company, and a lot of jobs in the process. And guess what? He won’t do that.”

Today’s stunning development was a marked turnaround from the rigid posture exhibited by the participants in recent days. After the Board issued a terse Sunday night announcement that it was pulling out of the proposed deal and preparing to move TWC’s assets through bankruptcy, Contreras-Sweet followed with her own statement acknowledging that the deal indeed seemed to have cratered. Then it was up to AG Schneiderman to ride to the rescue, an unexpected role for him, since it was his civil rights lawsuit that brought a nearly closed deal to a standstill weeks ago.

“Signing is not closing, but if we all keep focused and respect what we promised the Attorney General, then we can save this,” Ben Ammar told Deadline. “We will need help from the community. The agents, creditors and banks will need to be patient, and that can be their contribution to help save this company. That includes the #MeToo movement. Be patient. Don’t squeeze us. Give them the chance to build a new company.”

Even as the deal teetered, Ben Ammar believed the resurrection of the deal came from the resolve shown by the future owners of TWC’s assets, the AG, and Ben Ammar and his own boardroom cohorts Maerov and Bob Weinstein. In the board’s case, they worked tirelessly and were changeable he said, even though all of them will be exiting having lost their investments in TWC because of the Harvey Weinstein scandal.

Today’s meeting was attended by the AG and his staff, Contreras-Sweet, Burkle and his Yucaipa attorneys and advisors, and Maerov and Bob Weinstein. Ben Ammar took part by phone from Los Angeles. “I have been in Los Angeles for the past three weeks and had to stay because I was preparing for the bankruptcy, with bankers and other prospective buyers, because we couldn’t lose momentum,” he said.

Ben Ammar feels that the hard signals from both sides that the deal might crater actually helped move it toward a conclusion. Once the complexities of a bankruptcy became clear, including the vulnerable position of employees, victims and makers of the TV and film projects held in limbo, everyone decided to take one last try to salvage the transaction.

“Everything changed once we thought deal was not happening,” Ben Ammar said. “I don’t think anybody believed we would go through with bankruptcy, but when we pressed the button on that press release Sunday night, people realized we were serious. It woke up our troops, and it got the Attorney General to really help us in mediating this. And it got Ron and Maria to realize we weren’t kidding. Ron and Maria wanted to keep this company out of bankruptcy, and we tried one last time to turn a negative into a positive.”

While AG Schneiderman’s introduction into this drama with the deal-stalling civil rights lawsuit was a bracing one, Ben Ammar said that the AG was an integral part of putting the whole thing back together today.

“It was remarkable to see a busy public official from New York dedicate so much time to the objective of saving a company and those jobs, while at the same time making sure that victims are taken care of and that this doesn’t happen again in a healthy workplace,” Ben Ammar said. “For me as a foreigner, I run businesses in many countries and I have never seen an Attorney General get involved in such a productive way. As for Ron Burkle, I wonder if he has worked as hard on any deal in his life as what he did here. Both he and Maria put in the dedication and time in what was not an easy deal to make. And Bob, Lance and I were just as united in the interest of saving the company, those jobs, the filmmakers and all the film and television projects.

“Remember, the equity holders got zero here,” he said. “Nobody who invested in the company made money. Bob did not hesitate to do what was right, in the interest of the company, and that included firing his own brother. That alone is something that cannot be an easy thing to do for anyone. It was clear to us that the only group willing to buy these assets to form a continuing business out of bankruptcy court was Ron and Maria. That took courage, because it might have been easier to do that in bankruptcy. For Bob, Lance and myself, this was important because we did not want to give Harvey the satisfaction that his company would not survive after he left. My shareholders told me, make sure it is a soft landing for the employees, the creditors, the filmmakers and the projects.”

So what happens now?

Ben Ammar said that he, Maerov and Bob Weinstein have pledged to hang in for six weeks to see the deal through to closure. He believes that Burkle and Contreras-Sweet will be able to launch a new company any way they see fit. Ammar was also hopeful that the Attorney General might halt the civil rights lawsuit, which named several of the people at the bargaining table who got the deal done today.

“We presume that if he is satisfied that the conditions he imposed on the company and its buyer are met, we hope that will resolve everything,” he said. “The board did everything possible here. Attorney General Schneiderman’s main goals were to save jobs. Done. Set up a victims’ fund. Done. Get the buyers to commit to a healthy working environment. Done.”

Ben Ammar acknowledged it is unusual for an entrepreneur like himself to be this upbeat, considering that he lost his investment in The Weinstein Company along with other equity investors. He said he’s at peace with the loss, cushioned by other businesses that are successful. He also acknowledged that in his long business career, he has never been through a trip down the rabbit hole like this one, starting last fall when those articles about sexual harassment and assault allegations were leveled at Harvey Weinstein by dozens of women, in stories that broke in The New York Times and The New Yorker. Weinstein has steadfastly denied that any non consensual sexual activity took place. The board fired him immediately after.

“There’s certainly an interesting television series in here somewhere, one day,” he said. “We don’t know the ending yet, maybe we will in a year when it is clear what happens to the company, and to Harvey Weinstein. A screenwriter would have been hard pressed to invent something like what we saw happen, but what counts right now is that we salvaged something here from disaster.”