And never is it for a believer to kill a believer except by mistake. And whoever kills a believer by mistake - then the freeing of a believing slave and a compensation payment [diyah] presented to his [i.e., the deceased's] family [is required], unless they give [up their right as] charity. But if he [i.e., the deceased] was from a people at war with you and he was a believer - then [only] the freeing of a believing slave; and if he was from a people with whom you have a treaty - then a compensation payment presented to his family and the freeing of a believing slave. And whoever does not find [one or cannot afford to buy one] - then [instead], a fast for two months consecutively,1 [seeking] acceptance of repentance from Allāh.2 And Allāh is ever Knowing and Wise.
Translation: Saheeh International (English)
1 Uninterrupted except when there is an Islāmically valid reason, as in Ramaḍān.
2 An accidental death usually results from some degree of negligence or error for which the believer feels the need to repent.
It is unlawful for a believer to kill another believer, unless it occurs by mistake. If anyone kills a believer by mistake, he must free a believing slave as a compensation for his action. The relatives of the killer, who inherit from him, will be responsible for the blood money to be handed over to the successors of the victim, unless the successors give up the right If the victim belonged to a people at war with you, but he was a believer, then the killer must free a believing slave and no blood money will be owed. If the victim was not a believer but belonged to a people with whom you have a treaty, such as disbelievers living in an Islamic state, the relatives of the killer, who inherit from him, will be responsible for blood money to be handed over to the successors of the victim and the killer must free a believing slave as compensation for his action. If he cannot find anyone to free or he cannot afford the price, then he must fast continuously for two consecutive months so that Allah accepts his repentance for what he has done. Allah knows the actions of His servants and their intentions; and He is Wise in His legislation and planning.