Mumbai-based Raza Academy had objected to the film and issued a fatwa against the Oscar-winner and Majidi, calling the movie against Islam.
In a long statement, posted on his Facebook page, Rahman quoted verses from the Quran to explain his point of view and the decision behind boarding Majidi's movie, which is a planned trilogy on the life of Prophet Muhammad.
The 48-year-old music composer said he hasn't directed the movie and just did the music but he would not like to talk about his spiritual experiences of working on the film because they are very personal.
Quoting Mr Noori of the Academy, Rahman said, "My decision to compose the music for this film was made in good faith and with no intention of causing offence. In fact, the decision was based on a similar point of view expressed by Mr Noori."
Also Read
He said he always thought the audio-visual medium would help broaden people's understanding about the Prophet at a time when "there is a blur between the real world and the virtual world" where "unethical, unacceptable and unkind remarks are made online concerning the Holy Prophet".
Ending his statement on a positive note, he said, "Let us pray for forgiveness and from our hearts bless those who suffer in the world and bless the country that we live in..."
"Muhammad" is set in the sixth century and revolves around the childhood of the Prophet. The film marks Iran's biggest-budget production to date. It has released in Iran.