Can my landlord detain my security deposit?

I rented a house in dwarka, New Delhi in October 2017. I was staying there with my family, paying my rent and other utility bills in time. The issue started when I got the first water bill, just after 2 months from the day we initially shfted. The bill was more than 35k. I spoke with rhe landlord and the dealer, and was suggested that the bill is not proper as it contains arrears. Also was asked to wait for the government waiver on the bill. The same continued until yesterday. I had informed my landlord well in advance that I will be vaccating the flat, even then he suggested towait for the waiver on the waterbill. In the mean time, i paid all my other dues including rent, gas and electricity. I also got his items repaired before vaccating the house. The property dealer and the landlord held my security deposit, asking me to pay the water bill, which is more than a lac now. The property dealer also was harassing me after every 11 months for his commission of 15 days, as I was getting my agreement renewed. The landlord was party to it.