delivered the opinion of the court,
This case stated is not drawn with commendable precision. The paper-book does not state clearly against whom the judgment was entered. Inferentially it was against the garnishee, yet by order • of court the plaintiff in error was permitted to interplead, and he has taken the writ of error. As no objection was taken to his position on the record we will not treat it as fatally defective. If either the garnishee or the plaintiff in error is entitled to the money in question, the court erred in entering judgment in favor of the defendants in error.
*332Ashmead leased the store and-premises from the heirs of Mrs. Atherton, for seven and a half years, to be computed from the 1st of July 1869. He covenanted for himself, his executors, administrators and assignees, inter alia, to pay to the lessors a sum specified, in quarterly payments during said term; also to procure and maintain during the whole of said term a perpetual insurance on the building for $4500. To procure this insurance he was to place the sum of $270 as deposit money, that being the sum assumed to be necessary to secure the insurance. It was agreed, however, that at the expiration of the term by its own limitation, or by a ■total destruction of the building by fire prior to that time, the $270, less five per cent., should be returned to the lessee.
All the leasehold interest of' Ashmead in the premises was sold at sheriff’s sale on the 8th of March 1870. The purchaser transferred all his interest thus acquired to the plaintiff in error. He retained it until the expiration of the term on the 1st of January 1877, and then delivered possession to the lessors.
The defendants in error claim this fund of $270, less 5 per cent., by virtue of an attachment issued against the representative of the lessors as garnishee of Ashmead, on the 26th of May 1870. Their right to the money depends on the effect of the sheriff’s sale made previous to the issuing of the attachment.
It is an elementary principle of law that a lessee, during his occupation, holds both by privity of estate and of contract. His privity of estate depends upon, and exists with, the continuance of his term. By an assignment of the term his privity of estate is transferred to his assignee. It, however, remains annexed to the estate, so that the assignee holds in privity of estate with the original landlord. Taylor’s Land, and Ten., sec. 436. An assignment may be made either by the voluntary act of the party or by operation of law. When a term of years is sold by a sheriff under execution, the sale operates and takes effect as an assignment in law. A purchaser at such sale takes the estate liable to such covenants of the lessee as may have attached to the property demised. As he assumes these liabilities of the lessee he takes all the interest of the assignor in the thing assigned, whether in possession or expectancy: Id., sec. 437. He is obliged to perform all the covenants of his lessor which are annexed to the estate, so long as he retains possession. By accepting possession of the property, although the assignee may not be named in the original lease, yet he subjects himself to all the covenants that run with the land. He must fulfil them and is entitled to all the rights and privileges flowing therefrom as fully as the lessee held the same.
Hence it was held in Thompson v. Rose, 8 Cowen 266, that an assignment passed to the assignee a right to compensation, under the lessor’s covenant to pay for buildings and improvements which might be erected on the premises demised.
*333By the terms of this lease these $270 represented a portion of the obligation which the lessee assumed as necessary for his enjoyment of the premises for the stipulated term. The obligation attached to the whole term and was inseparable from it. The covenant was not merely personal and collateral, but became annexed to the property demised. It directly affected the enjoyment of the term. This case, however, does not rest on the implied obligation of the assignee. He was bound by the express language of the lease. The lessee’s right to this money at the expiration of the term, if there had been no sheriff’s sale, would have depended upon the fulfilment of his other covenants in the lease. The quarter’s rent last due on the lease has not been paid. The representative of the lessors claims the right to retain this money to apply on that rent, as against both plaintiff and defendant here. We think by virtue of the sheriff’s sale the entire interest of the lessee passed to the purchaser. Nothing present or prospective remained due to him from the lessors, nor out of this insurance fund.
The court, therefore, erred in entering judgment in favor of the attaching creditor, and the judgment must be reversed.
Judgment reversed, and judgment in favor of the plaintiff in error on the case stated.