For This Is It, Michael Jackson's planned 50-concert residency at London's O2 Arena, the star's sudden death really could have been it, with millions of dollars lost for producer/promoter AEG Live and the star's vision never realized.

Instead, the movie and music divisions of Sony have a film and soundtrack to sell, and AEG will share in the proceeds. But neither would have happened if the companies hadn't had fire-drill-paced meetings to turn a human tragedy into what is already being described as a creative and financial triumph.

On October 26, Sony's Epic label released the double-disc set This Is It to coincide with the release of the movie of the same name, which arrived in theaters to critical acclaim October 28 and grossed $101 million worldwide during its first five days.

The film answers a lot of questions, says Rob Stringer, chairman of Sony Music. I can't comment on a lot of issues that were going on with Michael, nor can anyone else, it's very difficult. But you want to know that he was still a fantastic entertainer, that he still cared, that he was still musically amazing. And all those things are just obvious in this film.

The saga began with the announcement last March of Jackson's string of shows at the O2, the result of two years of talks between Jackson and AEG Live. The ideas discussed included a tour, a few shows and, finally, a residency.

It took a while for (Jackson) to get comfortable with this, but when he finally made the decision that he wanted to do something, we were in the unique position where London was obviously the perfect place to do it, says AEG CEO Tim Leiweke.

Ticket sales for the initial 10 shows blew up at the box office, and the number of dates was raised to 50. Although all parties were taken aback by the demand, Leiweke says Jackson was fully committed to 50 shows, despite reports to the contrary. We've heard all of the speculation and opinions out there, but the reality is this is something Michael wanted to do, he says.

Conceptually, Leiweke says the production was all Michael's vision -- and that vision was expensive. It was budgeted to be $12 million, but Michael had big dreams and big vision, Leiweke says. By the time we were ready to go to London we were at $35 million.

In March Jackson reached out to Frank DiLeo, who managed him during a spectacular '80s run.

Even though he fired me, Michael was still my friend. We never lost the friendship, says DiLeo, who had no hesitation about coming back to work for Jackson. I was extremely excited about being back with him, because we were a magical team in the '80s. He missed it, I missed it.

As rehearsals got under way, public skepticism turned into anticipation. Even the rehearsals two nights before Jackson's death were extraordinary, Leiweke says. Everyone came out of there talking about how incredible it was.

The June 24 rehearsal didn't run as long, Leiweke says, and Jackson spent much of that time reviewing video production elements. He wasn't taxing his voice that night because he was getting ready for London, Leiweke says.

At 12:30 p.m. June 25, Leiweke received a call informing him Jackson had been taken to the hospital. Like the rest of the world, we were on the outside, he says. Randy (Phillips, AEG Live's CEO) didn't know specifics until he got to the hospital, and by then, unfortunately, it was our worst scenario. It was shocking because what we knew was he was healthy -- of that we were certain.

As word of Jackson's death spread, AEG had no time to mourn. The company shifted from preproduction to damage control.

A lot of decisions were made between Tim Leiweke and myself on cell phone while I was standing outside the emergency room, Phillips says. The first thing we did was have our security close off Staples Center, shut down the production and put all of our intellectual property into the vault at Staples Center so nobody could get near it or leave with it.

As Jackson's death became a media circus, Leiweke ordered Staples officials to turn arena into a fortress. We locked the building down and said, 'No one goes in and no one goes out,' Leiweke says. The instructions were clear: No pictures of the set, no one in Jackson's dressing room, no one touches anything. We fired a couple of employees because they took pictures of the stage, and we thought that was inappropriate.

Jackson died on a Thursday, which meant AEG executives in London and the company's Los Angeles headquarters had a marathon meeting. They started trying to figure out what to do about their investment, even as the words financial disaster started to creep into news reports.

We weren't thinking that way, Leiweke says. We knew we were in a bad spot and dealing with a crisis, but we believed eventually we'd work our way out of this. Needless to say, those were really difficult, long days -- bad days -- but I don't think we ever panicked. We had faith that we would eventually find a way to come out of this and recoup the investment.

The decision that saved This Is It -- as both AEG's investment and Jackson's legacy -- had been made weeks before. Rehearsals had been filmed, and it is that edited footage that became the Sony Pictures film.

I said, 'We've got to archive your comeback because this is going to be historical,' and (Jackson) agreed, Phillips says. We never expected it to be a movie. This was really for his personal archives -- and also to be B-roll and behind-the-scenes footage that probably would have been a DVD concert film.

Within days of Jackson's death, AEG started editing the rehearsal footage into a narrative at AEG's L.A. Live facilities. Under armed guards we had the editors working for three weeks collating 130 hours (of footage) and distilling it down to three-and-a-half hours in the first pass, Phillips says. And then we took 12 minutes of that and used it as a demo.

Up until longtime Jackson associates John Branca and John McClain, who had been named executors in Jackson's will, were officially named administrators July 6, AEG had been able to act unilaterally. There was some doubt about who would control Jackson's estate, and we didn't event know there was a will for over a week, Phillips says. As those details were resolved, however, AEG began negotiating with the executors and attorneys to determine how to proceed.

Four bid on This Is It: Universal, Fox, Paramount and Sony, which submitted the winning bid of $65 million, including $5 million for AEG's editing costs, according to Phillips.

One particular meeting stands out for Phillips. The first marketing meeting I had at Sony Pictures, there were about 40 people in this conference room, and what blew my mind was the fact that this little movie, this HD footage of Michael Jackson, was getting the attention of a whole studio. They just absolutely stopped to focus on this project, he says. And I was thinking to myself just how much Michael would have loved this, because it was so over the top.

On August 10, Los Angeles Superior Court approved a deal that Jackson's estate would get 90 percent of the film's net revenue, with the remainder going to AEG. (AEG will also receive revenue from the soundtrack.) That's a small percentage, considering that AEG put up the investment.

I'm sure some would argue that this is a small percentage to take for that much risk and that much work, Leiweke says, but we didn't want there to be any doubt as to our priorities here, which is to try and protect the best interests of the estate.

The This Is It film was created by the same team that had been working on the concerts, including director Kenny Ortega and choreographer Travis Payne.

As AEG worked to put together the movie and its soundtrack, it took shots from Jackson family members and others that the company is more interested in profits than in promoting Jackson's legacy. For his part, Phillips shrugs it off.

The problem with Michael is his death is as messy as his life was, he says. Everyone's looking for a villain. Sometimes there isn't a villain -- there's just bad circumstances and bad luck, and that is what this was.