It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that on the day of the Battle of Ta’if, the Prophet (peace and blessings be upon him) set free all the slaves of the polytheists who came to the Prophet (peace and blessings be upon him).