Those who denied the Qur'an and the Prophet (saas) placed a number of difficulties in his path, and tried to prevent him communicating his message, and, even to kill, arrest or exile him. Yet, in every case, the Prophet (saas) would explain to them the existence and power of Allah, that he himself was a true messenger and that the Qur'an was brought down as truth from our Lord. He warned them of the punishment of the hereafter, too. Even after the Prophet (saas) has been victorious, he still did not oppress the deniers, did not force the religion upon anyone, but said rather that everyone was free to believe as he wished.
Some of the verses on the subject are:
If they deny you, say, "I have my actions and you have your actions. You are not responsible for what I do and I am not responsible for what you do." (Surah Yunus: 41)
Say: "It is revealed to me that your god is One God. So are you Muslims?" If they turn their backs, then say: "I have informed all of you equally and I do not know if what you have been promised is near or far. He knows what is said openly and He knows what you hide. For all I know it might be a trial for you and you will have enjoyment for a time." Say: "Lord, judge with truth! Our Lord is the All-Merciful, the One Whose help is sought in the face of what you describe." (Surat al-Anbiya': 108-112)
Say: "My people, do as you are doing, just as I am doing. You will certainly come to know who will have the best home in the end. The wrongdoers will certainly not be successful." (Surat al-An'am: 135)