Allah, the Blessed and Exalted, says: "It is not permissible for a believer to kill a believer except by mistake. Whoever kills a believer by mistake must free a believing slave and pay blood money to the heirs of the slain, unless they forgo it. If the slain person belonged to a people hostile to you and he himself was a believer, then a believing slave must be freed. And if he belonged to a people with whom you have a treaty, then blood money must be paid to his heirs and a believing slave freed." [Surah al-Nisa: 92]
Hadith Referenceالسنن الكبرى للبيهقي / كتاب القسامة / Q16469