A "treaty" is an agreed truce or temporary end of hostilities, since this takes place when two belligerents wish to stop fighting--either due to one side being defeated (or being close to defeat) or both sides viewing a cessation of hostilities as being favorable.