If the deceased belonged to a people at war with you and he was a believer ; the freeing of a believing slave ( is prescribed ) , and if he belonged to a people with whom you have a treaty of mutual alliance , compensation ( blood money - Diya ) must be paid to his family , and a believing slave must be freed . And whoso finds this ( the penance of freeing a slave ) beyond his means , he must fast for two consecutive months in order to seek repentance from Allah .