What to do when someone threaten you?

I was living with my friend since 11 years and taking care of him. he made my life and did everything for me now i got PSU Job. 20 days back he called me up and said that I am not feeling well please come and take me to Doctor. I took leave from job and took him to doctor, did not get satisfaction so admit hi in a reputed hospital. after two days when he was fine i discharged him and took him to his house. That day in the night his brother in law, sister and brother came and stared fighting with him. he was so ill so i tried to stop them but they abused me, threatened me and tried to beat me. I ran away and called 100 to save myself. Police came and all were telling lies, his brother in law was drunk also lied. they all made me to leave my friend house in night 1 am but I took in in writing that if anything happens to my friend they will be responsible. they also forced my friends servant to leave at 1:30 am without giving him any money. now they are threatening me and saying i will make wrong cases against you. my friend got phone and called me from hospital that please save my life. what should i do?. I want to save my friend because they all are after his property as he does not have any family and also i have a job and they are threatening me that they will make wrong allegations against me. I spent all my saving in his treatment how to fight for truth.