'Men in Black 3' was no easy sequel to make Often film sequels are slam dunks at the box office, a seamless continuation from where a previous hit left off. But as the new installment of the 15-year-old franchise "Men in Black" proves, getting to the big screen isn't always a cakewalk. One of the most troubled productions in recent Hollywood memory, Sony Pictures' latest movie in the Will Smith-Tommy Lee Jones sci-fi-comedy franchise encountered multiple script rewrites, a discontented star and a three-month production shutdown as writers and studio executives scrambled to fix a project that nearly fell apart. By the time it was over, the studio had run up a tab of nearly $250 million - making "Men in Black 3" one of the most expensive releases of the summer. Opening Memorial Day weekend, the film known as "MIB3" faces formidable marketing challenges given that the last sequel came out a decade ago. That means an entire generation of youngsters never saw an "MIB" in theaters, and the bar for summer event pictures has risen considerably by such high-octane spectacles as current mega-hit "The Avengers." Nonetheless, Sony and the filmmakers are confident that their 3-D movie will lure families, fans of Smith, and those with fond memories of the franchise - an optimism backed up by pre-release research. Regardless of its commercial fate, the rocky production path of "Men in Black 3" shows that, contrary to the common perception, sequels are neither simple undertakings nor safe bets. "With something like 'Men in Black,' a sequel is actually more difficult than the original," said Walter Parkes, who has produced all three of the films. The challenge is to be fresh and original but also deliver on the core values of the franchise. When "Men in Black 2" came out in 2002, it grossed nearly $150 million less than the 1997 original and was panned by both critics and fans, leaving a sour taste for many moviegoers. Even the filmmakers acknowledged the last movie was flawed. It was a family trip to Southeast Asia about three years ago that convinced Parkes "Men In Black" still resonated around the world when he spotted locals watching the original movie on TV in an airport. Smith, meanwhile, had a long-gestating concept for a new movie involving time travel (in "Men in Black 3," his character, Agent J, jumps back to 1969 to team with a young version of Jones' Agent K, played by Josh Brolin). Eager to revive the franchise, Sony executives hired screenwriter Etan Cohen, hot off the success of the action-comedy "Tropic Thunder," to write the script. Picking a director, though, wasn't easy. Smith and executives were leery about bringing back Barry Sonnenfeld, who made the first two installments, because of conflicts on the set of "Men in Black 2," according to a person familiar with the discussions who was not authorized to speak publicly. In a lawsuit filed against his former agents over commissions, Sonnenfeld said Sony considered other directors for "Men in Black 3" before bringing him on. But he ultimately convinced all involved that he had a strong vision for the film. He was paid under $10 million - less than half the fee he collected on the first sequel, according to the lawsuit. Sonnenfeld declined to comment for this story. A Sony spokesman said Smith was not available. With Smith and the other talent lined up and a sizable New York City tax credit that was available only before the new year, Sony rushed the movie into production in fall 2010 despite not having hammered out all the plot elements. "Obviously, going into production without a finished script was not ideal," said Doug Belgrad, president of Sony's main film label, Columbia Pictures. But we had a huge degree of confidence based on the fact that it's a sequel and the creative elements involved ... were not going to wait forever. As production moved ahead on scenes placed in the present day, Smith grew more vocal about his concerns over the portion of the story that was set in 1969 that was to be shot after the Christmas holidays, said a person close to the matter who declined to be identified because it could jeopardize his relationship with Sony. Smith's clout and status as one of the world's biggest superstars had grown considerably since the first movie, for which he didn't even get top billing. The studio hired multiple writers to rework the historical scenes. To accommodate the rewrites, a holiday break that was intended to last two weeks was extended to mid-February and then again to March. Much of the crew was retained during that time, adding millions of dollars to an already hefty budget. Belgrad, who spent many more weeks on set than he typically does, said getting to the finish line was complicated by having to balance various creative elements into the story - a buddy comedy with ray-gun fights with slimy aliens, references to pop icons Lady Gaga and Andy Warhol, and a new emotional back story. "On every 'Men in Black' movie I have worked on, it's a little bit of a Rubik's Cube to line up the elements," he said. Those efforts were made even more difficult by a shifting comedy zeitgeist. "Men in Black 3," rated PG-13 for some salty language and violence, comes after a wave of raunchy hit comedies such as"The Hangover"and"Bridesmaids"have made for a very different moviegoing experience than that faced by the first two films. "To come back to a franchise after 10 years and try to recapture the spirit of the original from 15 years ago is very unusual and requires you to be bold creatively," said former top Sony executive Jeff Sagansky, whose film investment firm Hemisphere Media Capital covered about 25% of the movie's budget. Despite all of the film's obstacles, Sony executives believe they have a hit on their hands. Pre-release "tracking" surveys indicate that moviegoers' interest in "Men in Black 3" is solid if not spectacular in the United States, and is through the roof across Europe and in such fast-growing markets as Russia and Brazil. Today, overseas ticket sales for big 3-D Hollywood movies frequently outsize their take at the North American box office. And Smith is a proven box-office draw around the world. Still, with combined production and worldwide marketing and distribution costs of close to $375 million, "Men in Black 3" needs to be a huge hit to turn a profit. Staying out of the red is further complicated because the big-name talent involved, which includes executive producer Steven Spielberg, will get a share of the proceeds. If the film succeeds, it could pave the way for a "Men in Black 4." But any easy greenlight won't necessarily guarantee an easy path back to theaters. "When producing a big-budget sequel ... you have to balance the desires of the studio, the talent and the creators while giving fans a compelling reason why it's worth telling this new story," said producer and formerWarner Bros.executive Dan Lin, who did not work on "Men in Black" but has overseen several franchises, such as "Sherlock Holmes." "Doing it successfully is one of the greatest challenges in the industry," Lin acknowledged.