The opinion of the court was delivered by
CUFF, J.A.D.Plaintiff MD Associates appeals from the entry of a judgment against it and in favor of defendants Ricardo Alvarado and Millie Connors in the amount of $891.74. Plaintiff asserts that the trial judge improperly amended the pleadings sua sponte to include a counterclaim pursuant to N.J.S.A. 46:8-21.1.
On May 28, 1994, plaintiff and defendants executed a written lease for a one year term from June 1,1994 through May 31,1995. At the end of the term, defendants vacated the apartment. On June 30, 1995, plaintiff mailed to defendants by certified and *585regular mail a letter which outlined the charges it made against defendants’ security deposit, including a charge for June rent. The letter also demanded that defendants pay to plaintiff the sum of $462.84. When defendants failed to pay this sum, plaintiff commenced this action in the Small Claims section of the Special Civil Part to recover its claimed damages.
Defendant Alvarado appeared at trial. He testified that in April a representative of plaintiff advised him that defendants would not receive a new lease. At that time, defendant Alvarado advised plaintiff that they would vacate the apartment by May 31, 1995. He further testified that he quit the apartment on May 31 and left the keys in the apartment.
The trial judge found the testimony of Alvarado “extremely credible.” He then proceeded to find that defendants vacated the apartment on May 31, 1995. By implication, he also found that plaintiff had no intention to renew the lease and defendants notified plaintiff of their intention to vacate at the end of the term. Therefore, there was no basis for a charge for June rent. He also found that certain cleaning charges were improper. Thus, he concluded that plaintiff was only entitled to charge $307 against the $752.87 security deposit and he further determined that plaintiff wrongfully withheld $445.87 from defendants. Based on this finding, the trial judge concluded that defendants had a valid claim for the statutory penalty allowed by N.J.S.A. 46:8-21.1. See London v. Rothman Realty Corp., 176 N.J.Super. 288, 291, 422 A.2d 1049 (Cty.Ct.1980) (tenant entitled to double damages upon a finding that landlord wrongfully retained the security deposit).
The findings of fact made by the trial judge are well-supported in the record and will not be disturbed on appeal, particularly because the findings rely so heavily on the trial judge’s assessment of defendant Alvarado’s credibility. Rova Farms Resort v. Investors Ins. Co. of Am., 65 N.J. 474, 484, 323 A.2d 495 (1974). The issue before us is whether the trial judge can sua sponte amend the pleadings to assert a counterclaim for the security deposit and the statutory penalty in the absence of a specific *586request by defendants for such relief, and if so, whether plaintiff was prejudiced by such action.
N.J.S.A. 46:8-21.1 provides in relevant part:
Within 30 days after the termination of the tenant’s lease ..., the owner or lessee shall return by personal delivery, registered or certified mail the sum so deposited plus the tenant’s portion of the interest or earnings accumulated thereon, less any charges expended in accordance with the terms of a ... lease, ... to the tenant____
********
In any action by a tenant, ... for the return of moneys due under this section, the court upon finding for the tenant, ... shall award recovery of double the amount of said moneys, together with full costs of any action and, in the court’s discretion, reasonable attorney’s fees.
The statute is intended to protect tenants from overreaching landlords. Gibson v. 1013 North Broad Assocs., 172 N.J.Super. 191, 194, 411 A.2d 711 (App.Div.1980); Jaremback v. Butler Ridge Apartments, 166 N.J.Super. 84, 87, 398 A.2d 1339 (App.Div.1979). The legislation recognizes that the security deposit remains the tenant’s money, although it is designed to provide some protection from loss to the landlord. See Fischer v. Heck, 290 N.J.Super. 162, 169, 675 A.2d 254 (Law Div.1996). Therefore, once a judge finds that the landlord has wrongfully withheld all or part of a security deposit, the tenant is entitled to the statutory penalty of double the amount wrongfully withheld. London, supra, 176 N.J.Super. at 291, 422 A.2d 1049.
This action was commenced in the Small Claims section of the Special Civil Part. As such, no answer was filed. R. 6:3-1. The inability to file an answer, however, does not preclude a defendant from asserting a defense to the claim. Moreover, in an action for unpaid rent commenced by the landlord in the Small Claims section, this court held that the trial judge has the inherent authority to declare the rights and responsibilities of the parties to a commercial lease. Fanarjian v. Moskowitz, 237 N.J.Super. 395, 399-400, 568 A.2d 94 (App.Div.1989). Therefore, the trial judge could treat the tenant’s claim that the landlord failed to mitigate damages not only as a defense but also as a request for declarato*587ry relief. We note that in Fanarjian, the landlord could not claim prejudice because the issue of the landlord’s obligation to mitigate damages had been raised in the three actions filed by the landlord for unpaid rent.
As in Fanarjian, we recognize the inherent and express authority of a judge hearing a case in the Small Claims section to recognize defenses to the claim asserted in the complaint and in appropriate cases to fashion a counterclaim. In most instances, we would reject the notion that a judge presiding at a trial in Small Claims has the authority to recognize a counterclaim for affirmative relief in the absence of prior written notice to the plaintiff. However, in the context of a landlord-tenant relationship and an action by a landlord for damages to the apartment in which the security deposit has been applied to defray the expenses incurred by the landlord, we can envision scant prejudice to the landlord if the trial judge converts a defense that some or all of the expenses charged by the landlord against the security deposit are unfounded to a counterclaim for all or part of the wrongfully withheld security deposit. This is precisely the situation in this case.
This record establishes that Alvarado received the landlord’s June 30, 1995 letter and that he disputed various charges with a representative of the landlord. Thus, the landlord was on notice that Alvarado disputed the charge for the June rent, for the bleach and red stains on the carpet, and for the drawing on the wall. To disallow a sua sponte assertion of a counterclaim for the wrongfully withheld portion of the security deposit upon a demonstration by the tenant that some or all of the charges are unfounded would constitute a windfall for the landlord. Hence, under the circumstances of this case, we reject plaintiffs contentions that it was surprised and the issue of Alvarado’s entitlement to a portion of the security deposit was not properly before the court.
Affirmed.