Under a cloak of secrecy, the first film adaptation of controversial author Salman Rushdie's celebrated novel "Midnight's Children" has finished shooting in Sri Lanka.
Canadian director Deepa Mehta chose the South Asian island as a location instead of India or Pakistan, where the book is set, to avoid problems with religious fundamentalists.
"Heís got the Muslims," Mehta told the Canadian newspaper The Globe and Mail, which was granted access to the set before the completion of filming on Sunday. "And I've got the Hindus."
Rushdie earned a fatwa from Iran's Islamic regime in 1989 sentencing him to death for his novel "The Satanic Verses", which forced the British writer to live in hiding under police protection for years.
For her part Mehta has problems in her native India with hardline Hindus who object to her portrayals of lesbianism.
Despite obliging all the production crew and cast to sign confidentiality agreements, the three-month shoot was almost derailed when word made it to Iran, a close ally of increasingly isolated Sri Lanka.
After a complaint from Tehran, Sri Lankan authorities reversed their approval for the production, leaving Mehta stunned just a few days into work on what she has described as her biggest-ever film.
She appealed against the ban to Sri Lankan President Mahinda Rajapakse, who agreed to allow filming to continue.
"The president listened to those who were for and against the film and ordered the shoot to continue," said an official from Rajapakse's office, who asked not to be named.
Sri Lankan production company The Film Team, which co-ordinated the production, confirmed filming had been completed at the weekend despite the objections from Iran.
"We took great pains to avoid attracting controversies, but the Iranians found out about it," company director Divraj Perera told AFP.
Rushdie's acclaimed 600-page novel, which won the 1981 Booker prize, was considered almost unfilmable because of the complexities of the plot and the vast array of characters and places.
A five-part television adaptation previously written by the Indian-born author was never produced.
The novel deals with India's pre- and post-independence history through the eyes of Saleem Sinai, whose birth coincides with that of independent India on the stroke of midnight on August 15, 1947.
In 1993 it was chosen as the "Booker of Bookers" -- the best novel to have won the prize to date.
"The heart and soul of the book is intact, as well as its humour and I hope its emotional content too," Mehta told The Times of India on Tuesday.
The director, whose previous work includes the trilogy "Fire," "Earth," and "Water", admitted that the pressure of the project had weighed on her as the end of filming approached.
"I thought,'Oh my God, it's going to be crappy. What have I done? The most beloved book of all time. Iím an idiot. Salman is going to hate ití," she told The Globe and Mail.
She texted Rushdie in despair, to which he reportedly replied: "Every time I finish a book, I think itís crap. And sometimes it isn't."
The film, which is in English, Hindi and Urdu, will be released as "Winds of Change" in the first half of 2012 and has been pre-sold in many countries including Canada, Britain, France and Japan.
Rushdie wrote the script and was involved in choosing the actors, who include Seema Biswas, who starred in Mehta's "Water", Rahul Bose and Shahana Goswami.
Protagonist Saleem Sinai is to be played by newcomer Satya Bhabha.
Mehta is no stranger to controversy. She crossed Hindu fundamentalists in 1996 when her movie "Fire" was released, depicting two sisters-in-law who become emotionally close and then physically involved.
Cinemas were torched and her last film "Water", produced in 2005, was delayed for years after protesters in northeast India burnt down the set and threatened to rape the female cast.
She said the confidentiality agreements that all participants were forced to sign....