This is a contest for surplus moneys, arising upon a sale of premises upon the foreclosure of a mortgage executed by one Gavin to the plaintiff the 4th day of February, 1873, and recorded the same day. The contest is between the defendant Goldman who claims under a mechanic’s lien filed January 2, 1873, and one Brown, a mortgagee, whose mortgage was recorded Apiil 18, 1873. Both Brown and Goldman were made parties defendant in this action, and the complaint, contained the general clause *130 that they had or claimed some interest or lien in the mortgaged premises, which interest or lien, if any, accrued subsequently to the plaintiff’s mortgage, and the decree contained the usual clause foreclosing the defendants from any equity of redemption in the mortgaged premises. The premises were sold on October 18, 1874, and on October 20, 1875, an order of reference was entered to determine the priority of claims to the surplus moneys. A report was made thereon, dated April 1, 1876, which was opened to admit further evidence December 21, 1876, and subsequently another referee was substituted who made a report March 7,1877, by which the claim of Goldman was rejected on two grounds:
1. That his lien was prior to the mortgage foreclosed, and was not affected by the proceedings and judgment in the action, and if valid might be enforced.
2. Because his lien ceased on January 2, 1876, to which time it had been continued by order of the court.
The Special Term sustained exceptions to this report filed on behalf of Goldman, and decided that he was entitled to be first paid, which was reversed by the General Term. The decision of the General Term was made solely upon the ground that the lien of Goldman not having been continued by order of the court, was lost. The statute provides that “ liens shall in all cases cease after one year, unless by order ■of court the lien is continued, and a new docket made stating such fact.” (Laws of 1863, chap. 500, § 11.) The lien would have ceased on January 2, 1876, by the terms of the statute, but if it was cut off by the foreclosure, it had in fact ceased when the judgment of foreclosure was entered, but in every other respect it was valid until January 2,187 6. Before that time the premises had been sold, and the surplus ascertained, and a reference made to determine the priority ■ of claims, and a hearing was had before the referee, although the report was not filed until April after. If Goldman’s right to the surplus was good when he made his claim, I do not see how he lost it by not continuing his lien. The real
*131
estate upon which the lien was, had been sold and converted into money to be distributed among those who at that time were entitled to it. The statute is restrictive upon this class of liens, and was evidently designed to protect those interested in the premises, or who might desire to become interested by way of purchase or incumbrance against injury unless they were kept in life by order of the court, and hence it has been held that they must be continued by order, notwithstanding proceedings to foreclose may have been commenced, or even a judgment obtained for a sale of the premises.
(Stone
v.
Smith,
The other question presents more difficulty. If the foreclosure did not extinguish the claim of Goldman, then the sale was made subject to it, and he was at liberty to enforce it against the premises. His claim was prior to the mortgage of the plaintiff, and he had a superior legal right to payment from the premises. It is settled that the only proper parties to a bill of foreclosure, so far as mere legal rights are concerned, are the mortgagor and mortgagee, and those who have acquired rights under them subsequent to the mortgage.
(Eagle F. Co.
v.
Lent,
The bill was taken as confessed, and the usual judgment entered, and the court held that the judgment did not affect any interest which she had prior to the mortgage. In
Holcomb
v.
Holcomb
(
The order of General Term therefore should be affirmed.
All concur, Miller and Earl, JJ., absent at argument.
Order affirmed.
