*239By the court,
Hilton, J.The plaintiff hired of the defendant certain premises for a term commencing on May 1, 1861, and ending May 1, 1862, the rent to be at the rate of $500 per annum, payable in equal monthly payments, on the first of each month. The agreement was in writing, and concluded with the following clause : “ Said tenant has deposited with me, as collateral security, $41. 66, which amount is to apply as the rent for the last month of this agreement.” The rent due on January 1, 1862, not having been paid, the defendant, on the 11th of that month, instituted summary proceedings to recover possession of the premises, and on the 14th a warrant of dispossession was issued and executed.
The plaintiff sues to recover the amount thus deposited as collateral security, and the defence interposed is a counter-claim for the rent thus due prior to the eviction or dispossession of the plaintiff under the summary proceeding. On the trial before the justice, the counter-claim being equal to the demand made by the plaintiff, judgment was given for the defendant. The plaintiff appeals.
The judgment was right. A covenant to pay rent in advance is valid, and, when made, a right of action accrues upon it immediately on'its being broken by the non-payment of the rent agreed upon; and it is no answer to such an action that the tenant was evicted or dispossessed before the expiration of the period in respect to which the rent claimed accrues. Especially is this so where the dispossession was the result of legal proceedings duly instituted for the purpose. (Giles agt. Comstock, 4 Comst., 270.) To hold otherwise would be equivalent to saying that a tenant, by his own act, might deprive his landlord of a right of action already vested. (Hinsdale agt. White, 6 Hill, 507.)
When the eviction or dispossession of the tenant is not unlawful, but is the result of legal proceedings founded upon his wilful default, he cannot avail himself of it to avoid the payment of rent previously accrued ; nor, indeed, *240can he for any purpose except to show that thereafter the agreement made with the landlord for the use of the premises, and the relation of landlord and tenant in respect thereto, had ceased by operation of law. (Hinsdale agt. White, supra; Nichols agt. Dusenbury, 2 Comst., 283.)
Whitney agt. Myers, (1 Duer, 266,) relied on by the appellant, is not in conflict with these views ; but on the contrary, it is there stated in accordance with the rule expressed in Giles agt. Comstock, (supra,) that when rent is payable in advance, eviction before the end of the quarter is no bar to an action for the rent which has previously become due.
The remark made by Judge Bosworth, that “ the most the tenant could claim upon any equitable principle, was exemption from rent for so much of the quarter as elapsed after the landlord took possession of the premises,” was not made for the purpose of stating a rule of law, but because the judge at the trial had so allowed the tenant, and to show that there was no just cause for his complaining of the judgment he appealed from.
But it is unnecessary to go further than refer to Cushingham agt. Phillips, (1 E. D. Smith, 416,) a case in all respects similar to this, except that there the justice gave judgment in favor of the tenant making the deposit. That determination we reversed on appeal, holding that the claim for two months’ rent, payable in advance on May 1st, ■was a valid set-off against the action brought by the tenant to recover the month’s rent deposited by him as security at the making of the agreement, notwithstanding he had been dispossessed on the 18th of May for the rent thus payable in advance.
Judgment affirmed.