Iranians walk past a movie theatre showing "Outcasts 3" in Tehran on April 03, 2011. "Outcasts 3," an Iranian comedy mocking the candidates in the disputed 2009 presidential election, has been a hit at the box office. (ATTA KENARE/AFP/GETTY IMAGES)

In Iran, newspapers stay away from politically sensitive topics, more and more Web sites are being blocked, and anti-government demonstrations have been declared illegal.

But the popular cinema is going strong, and in recent weeks, the screenings of two locally made films at theaters across the capital have become a popularity contest of sorts between supporters of the government and the grass-roots opposition movement.

One movie, directed by a controversial backer of the regime, ridicules opponents of President Mahmoud Ahmadinejad. The other shows how complicated life has become for Tehran’s vast middle class, many of whom support the opposition movement.

“Ekhrajijha 3,” or “Outcasts 3,” with about $6 million in ticket sales, is a political comedy that follows a group of war veterans, some of whom are trying to convert their fame into political capital by running for president. Two of the most power-hungry candidates lie, cheat and organize illegal late-night parties to win the hearts of the nation’s young people, who are demanding change.

The film does not mention any of the real candidates in Iran’s 2009 elections. But opposition activists say that it is no coincidence that the two most opportunistic characters resemble the official image the government is trying to portray of presidential challengers Mir Hossein Moussavi and Mehdi Karroubi.

The two men became figureheads for the grass-roots movement that took to the streets to dispute Ahmadinejad’s victory. Both were placed under house arrest more than four months ago and haven’t been heard from since.

In his downtown office decorated with land mines, artillery shells and other war memorabilia, director Masoud Dehnamaki — a bearded veteran who says he misses the atmosphere of the Iran-Iraq war every day — said he saw no similarities between his film’s characters and the real-life candidates.

“The film warns against the wrong methods of democracy and elections campaigns,” Dehnamaki said between bites of pistachios and sips of tea. The film focuses on “concepts,” not real people, he said.

Although Dehnamaki insists that he is an independent artist, he appears to have many ties to official Iran. “Outcasts 3” has been heavily promoted on state TV, and authorities allowed him to shoot big scenes of political rallies in the center of Tehran, gatherings that many mistook for anti-government demonstrations.

Dehnamaki often finds himself denying charges that he was a leading member of the controversial Ansar-e Hezbollah militia, which was accused of beating anti-government demonstrators with sticks during student protests in 1999. “I was a journalist for the group, not a participating member, nor was I a leader,” he said.

But the opposition’s calls for a boycott of his movie bother him the most.

“The same people who always speak of tolerance and human rights are now inviting people for cultural boycotts,” he said. “They have created an unfair competition with the other movie.”

The other movie, “Jodaeye Nader Az Simin,” or “Nader and Simin: A Separation,” won the Golden Bear award at the Berlin Film Festival in February and the top prize at the Sydney Film Festival on Sunday.

The family drama centers on the growing problems facing a typical middle-class couple in their early 40s going through a divorce.

The film resonates powerfully with those who took to the streets in 2009, people well aware of the daily accommodations one needs to make in Iran to be protected from suffocating laws and outdated traditions. The movie sold about $3 million worth of tickets, according to local media.

Critics have accused director Asgar Farhadi of painting a dark picture of Iranian society, and the director is under pressure. Last year, his filming permits were temporarily revoked by the Ministry of Culture and Islamic Guidance after Farhadi came out in favor of exiled filmmakers. During an April speech in Paris, pro-government media reported that he supported Iran’s opposition.

Farhadi does not deny that he backs demands for more freedoms in Iran, but he said that he did not wish to go into details at the moment. And despite any troubles, early this year he received the Golden Simorgh, Iran’s highest film award.

In his spare office with the blinds down, Farhadi said Iran is a big paradox with two groups, one traditional and the other modern, constantly debating issues such as morality, religion and politics. “Our society is like a child reaching adolescence,” he said. “Some things will change as it gets older.”

Aware that he might be compared with Dehnamaki, he said he is less direct than his rival and, instead of providing answers, he wants his audience to leave the theater with questions, “because that is what we need in Iranian society, more thinking.”

In his movie, people often lie to protect themselves. “We need to be secretive in Iran in order to survive,” he said. “These lies are for safekeeping a relative calm.”

Farhadi said he strongly opposes the boycott of Dehnamaki’s film. “But believe me,’’ he said, “if there were appropriate circumstances for people to freely express their views, they would never choose boycotting films.”