The latter dictates conduct during actual war battle. War is only for self-defense of the Muslim community. If attacked, it is obligatory for the Muslims to defend their community. He who picks up the sword and attacks Muslims deserves the same in kind.
In Quran 5:32, the sanctity of human life is established. "if any one slew a person - unless it be for murder or for spreading mischief in the land - it would be as if he slew the whole people: and if any one saved a life, it would be as if he saved the life of the whole people". Thus, a war of aggression is forbidden in Islam.
However, if the Muslim community is attacked then Allah prescribes what the response of the Muslims should be in Quran 5:33, and even then, mercy is to be extended to those who surrender from the attackers in Quran 5:34.
In Quran 2.190 It says "Fight in the cause of God those who fight you, but do not transgress limits; for God loveth not transgressors". So the permissible fight is in response to aggression, in a defensive posture only, and even then, to use only enough defensive response to neutralize the aggression. Quran 2.192: "But if they cease, God is Oft-forgiving, Most Merciful".
Tumult or oppression is a form of aggression for which the Muslim community can engage with the oppressor in a strictly defensive posture. "And fight them on until there is no more Tumult or oppression, and there prevail justice and faith in God; but if they cease, Let there be no hostility except to those who practice oppression" (Quran 2:193).
In order to discourage aggression, the Muslim community should make any potential aggressor aware of their capabilities of defense: "Against them make ready your strength to the utmost of your power, including steeds of war, to strike terror into (the hearts of) the enemies" (Quran 8:60). The military posture should always be defensive, ready for peace and forgiveness, and that the Muslims should not fear that this posture will make them appear weak to the enemy: "But if the enemy incline towards peace, do thou (also) incline towards peace, and trust in God: for He is One that heareth and knoweth (all things)" (Quran 8:61).
The fight is always in response to aggression, including factions among Muslims: "And if two factions among the believers should fight, then make settlement between the two. But if one of them oppresses the other, then fight against the one that oppresses until it returns to the ordinance of Allah. And if it returns, then make settlement between them in justice and act justly. Indeed, Allah loves those who act justly" (Quran 49:9).
The word 'peace' and its derivatives are mentioned at least 50 times in the Quran. Islam itself means 'peace through submission to Allah'. Islam is all about the preservation of peace and justice throughout humanity. Therefore, warfare is only justified as a last resort as a defensive response against aggression and tyranny.