In a hostage crises, is it ethical for a government to agree to grant a terrorist immunity if he releases the hostages,

In a hostage crises, is it ethical for a government to agree to grant a terrorist immunity if he releases the hostages, even though the government has every intention of capturing and prosecuting the terrorist once his hostages are released?
All discussions must be completed on-time and must include in-text citations and references in APA style formatting .