But when the forbidden months are past, then fight and slay the Pagans wherever ye find them, an seize them, beleaguer them, and lie in wait for them in every stratagem [Quran 9:5]
The verse should be read in conjunction with the previous verse that directs Muslims to honor the treaty they have made with the pagans as long as they keep their end of the bargain. Verse 9:5 deals with pagans who are still at war with the Muslims or had become Muslim only in name and would not do things incumbent on a Muslim such as praying and paying charity dues. God is instructing the Muslims to fight such pagans in war. However, if any of the pagans require asylum, they should be given so and they should be escorted to safety (Verse 9:6). The reason God is instructing as such is evident from Verse 9:8, which says that if the pagans win the war, they would neither honor treaties nor spare the lives of their kin who had become Muslims. Therefore, it was important for the Muslims to win against the tyranny of the pagans.