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.
"I am not a scholar of Islam. I follow the middle path and am part traditionalist and part rationalist. I live in Western and Eastern worlds and try to love all people for what they are, without judging them," Rahman wrote.
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."
Rahman said what if he "met Allah on the Judgement Day and He questioned him about not doing the movie whose intention is to unite humanity, clear misconceptions and spread my message that life is about kindness, about uplifting the poor and living in the service of humanity and not mercilessly killing innocents in my name."
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".
Rahman said he was "fortunate and blessed to live in a country like India where religious freedom is practised and where the aim of all communities is to live in peace and harmony sans confusion and violence".
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.