Unlivable Conditions so vacating the premises

Due to structural issues, There has been water entering our house of heights upto 2 feet. Please note: It is complete sewage water. This water comes from leakages from the walls and reverse flowing from the drains in bathrooms and balcony. Due to the occurrences of the above situation we had informed our owner to make necessary repairs or changes to the structure. But he failed to make any betterment to the situation we had water in house again and our furniture/electronics was damaged to the extent of 3,27,000/- So we came to a mutual verbal/whatsapp and telephonic conversation to vacate the premises and Now after vacating The owner has started his tantrums. We had paid a security deposit of Rs. 85000/- which is on obvious grounds to be returned in full as the house is an unlivable condition to live in. He is quoting us the repair charges of the pump and other repairs which have incurred due to water damage because of non proper structure and rains. He is threatening us saying he will return only Rs. 58000/- after we send him in writing that we are okay with him deducting money for the same. Until then he will not send back the SD he says. please help us if we can do something on this. Thanks