Hamas agreed to release Israeli soldier Gilad Shalit in exchange for more than 1,000 Palestinian prisoners.