When a school district votes to raise money by taxation, the tax is to be assessed by the assessors of the town, in the same manner as town taxes are assessed, on the polls and estates of the inhabitants therein, and on all estates liable to be taxed therein. Gen. Sts. c. 39, § 26. “When the estate of a nonresident owner is taxed, it may be taxed in such district as the assessors of the town determine, and the assessors, before they assess a tax for any district, shall determine in which district the estate of any nonresident shall be taxed, and certify in writing their determination to the clerk of the town, who shall record the same.” § 25. A compliance with this requirement of the statute is a condition precedent to the valid assessment of a school district tax; and if it is not complied with, an inhabitant of the district may avail himself of the defect. Taft v. Wood, 14 Pick. 362. Bacon v. School District in Barnstable, 97 Mass. 421. Two things are to be done; and the written certificate of the determination of the assessors to the town clerk is made by the law as indispensable as the determination itself. •In the present case, the facts find that there were lands of nonresident owners taxed which had become such since the last determination and assignment by the assessors, which *136was made when the town was last districted anew in 1847. These lands should have been duly assigned to some schoo district before the assessment of the tax, the validity of which is contested in the present suit. But no return of them to the town clerk was made prior to the assessment, which is consequently invalid. Judgment for the plaintiff.