Tenant not willing to vacate flat.

HI, I Purchased a flat in Navi mumbai that flat was about to auctioned by Bank, because the old owner was unable to pay his EMI's so before bank could take action and put it on auction, that owner contacted us and we purchased that flat by helping him giving money to avoid auctioning with all documentation,that time there was tenant in that flat After the registration when we were suppose to get the keys the tenant is showing us the agreement of locking period with previous owner that is till 2019 so they are saying they will not vacate the flat as the agreement with previous owner was till 2019, on heavy deposit(4 Lacs) where tenant didnt pay monthly rent. As we have the home loan on that flat and we are living in rented apartment we cant go with this we need monthly rent for that the tenant is not agreed and we do not have any agreement with tenant directly so in that case what can be done? I have one more question if property is on loan and the owner is defaulter of not paying EMI of home loan can he make locking period agreement with any tenant is it legal?