Sayyiduna Qays bin Asim (may Allah be pleased with him) said to the Prophet (peace and blessings be upon him): I buried twelve or thirteen daughters alive in the Days of Ignorance. The Prophet (peace and blessings be upon him) said: "Free a soul (a slave) on behalf of each one of them."
Hadith Referenceالمعجم الكبير للطبراني / باب القاف / 15959