I left still owing last months rent but I paid it 2monts later. Now the landlord refuses to give back my sec deposit and I do have proof that this rent was paid.
The answer to your question depends on whether the landlord has given you a reason for keeping the security deposit. If he did (such as for cleaning or damages) then he may be able to keep part or all of the deposit. If you have paid him everything under the lease and he has kept additional monies beyond that, you may have a case. In any event, you may want to talk to an attorney if there's enough money involved. If not, some internet research might help you figure out whether it's worth going after the money.