Al Qaeda 's North African wing had previously said it was holding the hostages and had demanded 20 of its members be freed from detention in Mali and other countries as a condition for releasing the hostages .