An Egyptian box office hit that highlights the religious establishment's cosy relations with the state has provoked a backlash from Sunni Muslim leaders, with some calling for the film to be banned.

Adapted from a novel by prominent journalist Ibrahim Eissa, "Mawlana" ("The Preacher") tells the story of a popular television preacher who struggles to reconcile his religious principles with demands and pressures from politicians and security agencies, as well as ordinary human temptations.

Through the protagonist, a Muslim scholar from Al-Azhar, Cairo's 1,000-year-old centre of Islamic learning, the film lays bare the complex and troubling interplay between the state, religious establishment, mass media and "extremism" in Egypt.

The issue could not be more timely.

READ MORE: The power of Egyptian cinema - online

President Abdel Fattah al-Sisi, a former army chief, overthrew the government in 2013 and is still battling fighters.

The day after the film's premiere, a suicide bomber killed 28 people in an attack claimed by the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) on Cairo's main Coptic Christian cathedral.

Muslim leaders at Al-Azhar said the film tarnishes the image of establishment Islam just as it steps up efforts to rein in attacks.

"The film came out at a bad time. This is a time when people are asking to renew religious discourse and improve Azhar's image. The film coming out now is very wrong. Even its title is problematic," said Sameh Mohamed, a preacher at Al-Azhar.

Mohamed said the film, in which the televangelist initially bends to the demands of senior officials before having a change of heart, paints Muslim scholars as unprincipled and state-controlled.

The film's director, Magdy Ahmed Ali, begs to differ.

"This is the perfect time for the film," he said. "The army is fighting terrorism, extremism is on the rise, and people are calling for a renewal of religious discourse."

Box office hit

Sisi has made combating attacks a priority and assigned Al-Azhar a central role in defending mainstream Islam.

Egyptian courts have jailed thousands of Muslim Brotherhood followers during his rule.

Shortly after the military ousted the Brotherhood's Mohamed Morsi from the presidency in mid-2013, the religious endowments ministry fired 55,000 preachers not authorised by Al-Azhar.

Religion, with power, with money is a killer triangle ... This triangle is responsible for all the intellectual, political and social decline we are in. Eissa, script adviser

The preachers were accused of inciting violence, spreading "extremist" views or supporting the Brotherhood.

The Muslim Brotherhood, which has been banned by the government, says it is peaceful.

Variety, the US-based entertainment trade paper, called the film "a forthright critique of corruption and fundamentalism" that was "certain to be one of the most discussed movies" in Egypt.

"The Preacher" is showing to packed houses in regular commercial cinemas. It had raked in 7.3 million Egyptian pounds ($388,300) by its third week - a strong showing for a local film.

Apart from Sunni-Shia tensions, the film explores the origins and effects of sectarian tensions that have flared in recent years between Muslims and Christians.

Egypt's Copts are the largest Christian minority in the Middle East, making up about 10 percent of the country's 83 million population.

In the film's dramatic climax, a young man blows up a church.

Life imitated art the day after its premiere with the suicide bomb attack on Cairo's Saint Mark's Cathedral, the seat of the Coptic papacy.

"Religion, with power, with money is a killer triangle," Eissa, who helped adapt the script for cinema, told the Reuters news agency.

"This triangle is responsible for all the intellectual, political and social decline we are in."