Whilst he lived in Mecca, Mohammed was surrounded by enemies. Although he made threats at that time, he was never violent. Now he was a political force and set about making good on those threats.
The Koran clearly reflects this change. It is therefore divided by scholars into the Koran of Mecca and the Koran of Medina. Because it is not arranged chronologically, this distinction is hard for a layman to recognize. Once you arrange the Koran in its correct chronological order however it becomes very clear.
From the Koran of Mecca:
88:21 Warn them, because you [Mohammed] are merely a warner. You have no authority over them, but whoever turns back and disbelieves, Allah will punish them terribly.
Compare this with the later Koran of Medina:
8:12 Then your Lord spoke to His angels and said, “I will be with you. Give strength to the believers. I will send terror into the Kaffir’s hearts, cut off their heads and even the tips of their fingers!” This was because they opposed Allah and His messenger. Ones who oppose Allah and His messenger will be severely punished by Allah. We said, “This is for you! Taste it and know that the Kaffirs will receive the torment of the Fire.”
Mohammed made it clear that wherever there was a contradiction in the Koran; the earlier verse would be abrogated (cancelled out) by the later verse. Since the Koran is not written in chronological order, it is impossible to understand it without knowing which verses have been abrogated. Muslims often point to non-violent quotes from the Meccan Koran, but fail to point out that these verses have been abrogated by later ones.
I want you to put on your thinking cap at this point, because I am about to explain a very important facet of Islam which is a little challenging. This is however very important for understanding Islam itself.
As we have just seen, later verses of the Koran abrogate earlier ones. We already know however, that the Koran is considered to be the perfect word of Allah. In Western logic, when two things contradict each other, one of them must be wrong. In Islamic logic however, two things can contradict each other and yet both be right.
The Koran tells Muslims to follow the example of Mohammed but which example? In Mecca, Mohammed never used violence against Kaffirs and in the very early days even showed some tolerance of other religions. Once in Medina, Mohammed used violence almost all the time to achieve his aims. He never showed any tolerance to Kaffirs at all.
The Medina Koran is the later one and so abrogates the Meccan Koran and yet the Meccan Koran is still valid because the Koran (and Mohammed) is perfect. So a Muslim can follow either example, though the Medina example is better because it is later. So how does a Muslim know which one to choose?
As usual we have to look at Mohammed’s example to know the answer. In Mecca, Mohammed was not powerful and was surrounded by enemies. During that time he preached some tolerance and non-violence. When he went to Medina, he became powerful and used violence frequently to achieve his goals.
Mohammed’s example of how to behave is not consistent but varies according to circumstance. When you are not in a position of power, be quiet and do not draw attention to yourself. Use the time to build up strength and numbers until you become powerful enough to begin Jihad. This is Mohammed’s example or “Sunnah”, which comes from the hadith (traditions of Mohammed) and The Sira (his biography).