Islam encouraged the believers to grasp any chance or possibility of peace and stick with it, Allah said in Quran: “O you who believe, enter wholeheartedly into peace, and do not follow in Satan’s footsteps, for he is your sworn enemy” (Qur’an, 2:208).
Believers are also ordered to accept any attempts at peace: “But if they incline towards peace, you [Prophet] must also incline towards it, and put your trust in God” (Qur’an, 8:61). It is ha way the Prophet (PBUH) build his state upon.