As he was overseeing rehearsals for the monumental, multimillion-dollar opening ceremony of the 2008 Beijing Olympics, with its cast of 15,000 and fireworks extravaganza, the film director Zhang Yimou faced enormous pressure. Hoping for a distraction, he turned to a book. But far from light entertainment, it was a novel called “13 Female Martyrs of Nanjing.” The subject was familiar to all Chinese citizens: the massacre of more than 200,000 people when Japanese troops overran what was then China’s capital in December 1937. But the point of view was not, and Mr. Zhang quickly resolved to turn the book into a movie. “The whole story was told from the perspective of a 13-year-old girl, and I found that intriguing,” he recalled during an interview in New York last month. “I was always interested in this topic, of course, but all the many television programs and documentaries I had seen seemed very similar to me. There is always this box, and you cannot go outside the box. So when I read the novel, I saw a measure of light that took me in a different direction.” Mr. Zhang’s historical epic, retitled “The Flowers of War,” had its premiere in China this week, will open on Wednesday in the United States and, as part of what seems to be a campaign by China to soften its image abroad, is China’s official submission for the Academy Award for best foreign-language film. But the movie has also unexpectedly become enmeshed in contemporary politics after thugs in plain clothes, believed to be Chinese government security agents, roughed up the movie’s star, the Academy Award winner Christian Bale, on Friday when he tried to visit Chen Guangcheng, a leading human-rights activist. At the same time, Mr. Zhang, some of whose early films were banned by censors, is being accused of collaborating with China’s Communist regime, a charge that was also leveled at him when he agreed to direct the Olympics event. Chinese bloggers derided him then as “a master of directing totalitarian group calisthenics,” whose “blockbusters create standards for pompous state ceremonies,” and similar criticisms are now surfacing. Mr. Zhang, however, suggested that the process of making films in China is an elaborate cat-and-mouse game, with artists constantly having to navigate around the limits that an all-powerful Communist Party imposes. Since “all the locations are owned by the government,” and “you must go through censorship after the movie is made,” it is “hard to get approval for every movie in China, not just this one,” he said. And because he is China’s most renowned director, with credits that include “Raise the Red Lantern” and “House of Flying Daggers,” his own situation is especially complicated, he added. “If you’re well known and under the spotlight, all eyes are on you, and they are more strict about your project — because you have more influence — than with a new, emerging director.” Made at a cost of more than $90 million, part of which came from Chinese government sources, “The Flowers of War” is the most expensive Chinese film ever made. Mr. Zhang, 60, said he envisioned the movie “as a starting point for Chinese cinema to be more globalized,” and the casting of Mr. Bale, who has played Batman and was coming off an Oscar as best supporting actor in “The Fighter,” seemed to symbolize that step. “The Flowers of War” tells the story of two very different groups of women who seek refuge in a Roman Catholic cathedral during the slaughter in Nanjing. One is composed of teenage convent students, the other of jaded prostitutes, but both are forced to entrust their fates to a drunken and avaricious American drifter, played by Mr. Bale, who has also washed up there. The Nanjing Massacre, also called “the Rape of Nanjing,” is one of the most searing tragedies in China’s turbulent modern history. But the Communist Party has always managed and controlled its depiction carefully, to reflect current objectives domestically and in China’s relations with Japan, where the bloodbath is sometimes still minimized. China’s official line was on display when “The Flowers of War” had its Beijing premiere on Sunday, with Mr. Zhang and Mr. Bale attending, in the imposing government building that houses the People’s Political Consultative Conference. In a ceremony after the film ended, some cast members chanted “Chinese soldiers!” as they brandished fake rifles. But Mr. Zhang has also sought to diverge from that orthodoxy in the film. He portrays an officer of the Chinese Nationalist Army — bitter enemies of the Communists — as a self-sacrificing patriot and, in a scene he said was inspired by Roman Polanski’s “Pianist,” shows the human, cultured side of a Japanese officer who prevents his troops from pillaging the church and then listens appreciatively as the convent girls sing. He also presents a favorable portrayal of the Roman Catholic Church and its faithful; Mao Zedong broke diplomatic relations with the Vatican 60 years ago, and contacts remain limited and tense. In addition, he gives prominence to the humanitarian role played by the 22 foreigners, mostly missionaries and business people, who stayed behind in Nanjing, an aspect of the massacre that Communist Party propaganda has traditionally preferred to gloss over.