A truce refers to an agreement made by the Muslim ruler or his deputy with the enemy to cease fighting for a specified period, whether short or long, as may be needed. This is perfectly permissible if it is of benefit to the Muslim community, as in the case when the Muslim community is in a state of weakness or unpreparedness to fight, or for some other valid reason such as the hope to be able to advocate Islam among unbelievers, etc.
The majority of scholars agree that war gains are divided into five shares. The first share belongs to the Muslim treasury, and it is taken by the Muslim ruler or anyone he has assigned for the purpose.
When Muslims take enemy officers and soldiers as prisoners of war, they must treat these captives well. In the Battle of Badr, the first major battle in the history of Islam, the Muslims took a large number of unbelievers as prisoners. The Prophet (peace be upon him) gave orders that these captives should be treated well. His Companions gave them preference over their own families in food and drink, showing them every kindness.