In October 2011, a deal was reached between Israel and Hamas, by which the captured Israeli soldier Gilad Shalit would be released in exchange for 1,027 Palestinians and Arab-Israeli prisoners, 280 of whom had been sentenced to life in prison for planning and perpetrating various terror attacks against Israeli targets.