For years, Sony Pictures considered—and then decided against—updating “The Karate Kid,” its beloved 1984 family film about a browbeaten kid (Ralph Macchio) with a single mom and the enigmatic martial arts coach (Noriyuki “Pat” Morita) who teaches the boy how to believe in himself, catch a fly with chopsticks and kick some bully butt along the way.

Sony had pretty much beaten the franchise into submission, with the third sequel, 1994’s “The Next Karate Kid” featuring 19-year-old Hilary Swank, marking the series’ commercial and critical tap-out (a domestic gross of just $8.9 million, a Rotten Tomatoes score of a mere 6% positive).

Even though almost every studio was rebooting long-dormant franchises with mixed results — " Superman Returns,” “AVP: Alien vs. Predator,” “Star Trek,” among the disinterred titles — Sony didn’t want to make another “Karate Kid” movie just because the title was lying fallow. “This is a valuable property,” says Doug Belgrad, president of Sony’s Columbia Pictures, recalling his thinking at the time. “We better have the right idea, or it’s not worth doing.”

So even when Overbrook Entertainment, the production company for Sony’s biggest star, Will Smith, pitched Sony on a “Karate Kid” remake featuring Smith’s 11-year-old, martial-arts-obsessed son (and his costar in “The Pursuit of Happyness”), Jaden, in the Macchio role, the studio demurred. Finally, just as Beijing was about to host 2008’s Summer Olympics, Overbrook altered its pitch: What if the new version were set in China?

With more than 1.3 billion residents, China is both the world’s most populous nation and one of Hollywood’s biggest challenges, with borders to entry almost as tall as the Great Wall. China can be one of the biggest-grossing countries outside of the United States for certain films, even though DVD piracy is rampant and there aren’t a lot of theaters; “Avatar” grossed the local currency equivalent of $195 million, the most of any nation beyond American borders.

Paramount’s “Transformers: Revenge of the Fallen” and Sony’s “2012" (in which Chinese ark builders help save the planet) were also huge hits in the country, and business is booming for Chinese movies too, such as John Woo’s historical epic “Red Cliff.” Total Chinese box-office returns surged more than 40% to more than $900 million in 2009.

If Sony made “Karate Kid” with a Chinese partner, it could be a part of that Asian gold rush, but the deal would come with some foreseeable obstacles, including possible government censorship.

Belgrad didn’t think long before giving his answer. “That was enough to say yes,” says Belgrad, who had long been fascinated by the country and had developed a “Sinbad” movie that would be set there. “It’s a fascinating place.”

The “Karate Kid” decision not only launched the biggest modern movie co-production between an American studio and China, but also opened up the film to government-mandated creative controls that ultimately yielded two slightly different movies, as Chinese censors asked that several scenes, including sequences of bullying and a kiss between two young characters, be trimmed. The geographic move also launched an internal debate about changing the film’s name to “The Kung Fu Kid,” as karate is a Japanese fighting style.

Although the production, which puts action star Jackie Chan in the Morita role and opens in domestic theaters on June 11 (arriving in China several weeks later), was granted vital access to an array of spectacular Chinese locations — the Great Wall, the Forbidden City, Wudang Mountain — the filmmakers also had to negotiate sometimes byzantine permitting rules and parley with residents who weren’t used to having a movie crew descend on their streets.

Try to film a movie in Brentwood, and the locals will grudgingly get out of the way. Do the same outside of Beijing and the rules are different. “The people run the country,” says James Lassiter, who is Overbrook’s president and serves as a “Karate Kid” producer. “So if people didn’t want you shooting in their neighborhood, there’s no authority that can tell them they have to. That’s why it’s called the People’s Republic of China.”

The filmmakers, who hired a number of Chinese crew members, say the production inconveniences were minor and the creative conversations with partner China Film Group Corp. easily resolved. As part of Sony’s deal with China Film, the government-run movie company invested about $5 million in the film’s approximate $40-million budget, retaining “Karate Kid’s” distribution rights in China and some ancillary rights in a few Asian territories.

The film’s director, Harald Zwart (“Agent Cody Banks,” “The Pink Panther 2"), says that he never felt there was government pressure to steer the movie in a certain political direction, even though “Karate Kid” depicted working-class communities around Beijing as a little bit ramshackle.

“There was never any question of don’t show this and don’t show that,” Zwart says, adding that the creative conversations with China Film were “very cooperative” with a lot of “back and forth.” Zwart personally made the edits for the Chinese version, clipping the chaste smooch between Smith’s Dre Parker and his girlfriend, Mei Ying (Wenwen Han). “I am not going to be an expert on what works in China,” Zwart says. “But I think the Chinese version is a beautiful movie.”

For all the growth in China’s movie business, the country only allows 20 non-Chinese movies into the country’s theaters every year, and the government dictates the distribution terms, which return only about 13% of a film’s ticket sales to its makers (the revenue share is closer to a 50-50 split in North American theaters).

To get around those draconian limits, some studios have tried making local-language productions, movies in Cantonese and Mandarin, rather than simply relying on exporting their movies from the United States. Disney has launched a Chinese “High School Musical,” while 20th Century Fox made the successful Chinese romantic comedy “Hot Summer Days.” Neither project will likely travel outside of Asia, as their modest budgets don’t require them to be global releases.

At the same time, China is reaching out to American producers, and China Film’s Han San Ping has traveled to Hollywood to develop business.

“On every front, China is trying to globalize and internationalize itself,” says China expert Orville Schell, who has written extensively about the region, including the book “Virtual Tibet: Searching for Shangri-La From the Himalayas to Hollywood.” He says U.S. movie studios, like global pop culture consumers, increasingly are drawn to the region. “It’s a go-to spot that has a lot of cachet,” Schell says.

The “Karate Kid” deal follows a different model, where an American studio and a Chinese, government-run movie arm collaborate on a production. “The access was key,” Belgrad says. “We had an unprecedented amount of production value by shooting there.”

While the financial and location benefits can be material, so too can questions of interference. The American makers of 2006’s “The Painted Veil,” which filmed all over China, said their Chinese production and finance partners asked that several of the film’s sequences about the Chinese Revolution and the country’s cholera victims be redacted.

By setting “The Karate Kid” in modern-day China, the filmmakers were able to magnify the original film’s fish-out-of-water plot (in the first film, Macchio plays a New Jersey teen who relocates with his single mother to Los Angeles). In the new story, Smith’s Dre and his mother ( Taraji P. Henson) leave Detroit for Beijing when she changes jobs. Soon after arriving, Dre is confronted by a band of local bullies led by a thug named Cheng (Zhenwei Wang).

Lassister says that while China Film was worried about the film’s depiction of bullying, they were able to reach a common ground. “We talked about the necessity of the fighting, and the level of the violence,” he says. “I understand their point of view. But we portray both good and bad Chinese; it’s not that they are all bad.”

Determined to fight back, Dre enlists Mr. Han (Chan), a mysterious maintenance man who teaches Dre the Chinese martial art of kung fu. (There’s really no karate in the film, and Sony wrestled with changing the title to “Kung Fu Kid,” but the original film’s producer, Jerry Weintraub, nixed the idea.) In following the trajectory of the first film, Dre in the new “Karate Kid” spends more and more time with Mr. Han, who ultimately becomes the boy’s surrogate father. Jaden Smith trained for four months before production commenced to perfect his fighting, studying under Wu Gang, Chan’s stunt coordinator.

“It’s great, and it’s fun — but it’s very hard work,” Smith told The Times earlier this year.

Sony privately says “The Karate Kid” is among the studio’s highest-testing movies ever, and it looks ready to open strongly opposite another movie filled with a lot of fighting, 20th Century Fox’s “The A-Team,” both here and abroad.

Equally important, the production has shown Sony and Overbrook that filming in China can be a rewarding experience, even factoring in some of the obstacles. But don’t look for an American studio to propose making a film about the Dalai Lama or 1989’s Tiananmen Square protests in China — the country may love light, entertaining fare such as “The Karate Kid,” but it is far less interested in examining the more complicated aspects of its own history. “If you’re going to get into something political,” Schell says, “China is not your destination of choice.”

But Overbrook and Sony are ready to go back. Says Lassiter: “It was a fantastic experience. And it helps with our overall objective to become a global film production company.”

john.horn@latimes.com

Times staff writer Susan King contributed to this report.