Islam allows war in self-defence (Qur'an 22:39), to defend Islam (rather than to spread it), to protect those who have been removed from their homes by force because they are Muslims (Qur'an 22:40), and to protect the innocent who are being oppressed (Qur'an 4:75).