delivered the opinion of the Court. The plaintiffs in this action seek to recover of the defendant, a deputy sheriff, a sum of money collected by him in his official capacity, which they contend, ought to have been applied to the satisfaction of their execution against Charles Haynes ; this is resisted on the ground that he was bound to pay it over and did pay it, to satisfy the execution! of Benjamin Haynes, a prior attaching creditor. The defendant is, therefore, a mere stockholder between these attaching creditors. It was suggested, rather than argued, by the counsel for the defendant, that although he holds an indemnity, he might be personally liable and the indemnity not available, because, as a general rule, a man cannot take an obligation to indemnify him against his own wrongful act. If there were any ground for this scruple, after the many cases in which sheriffs in like cases have acted under an indemnity, apparently with the sanction of the law, (Bond v. Ward, 7 Mass. R. 123,) the matter seems to be set at rest by Revised Stat. c. 97, § 18, which provides, that when there is a reasonable doubt as to the ownership of the goods or as to their liability to be taken on the execution, the sheriff may require sufficient security to indemnify him. In truth, the principle suggested does not apply ; the bond is not given to the officer to indemnify him for doing a wrongful act, but is a guarantee to him that the act which he is required tc do, is rightful, and that the property to be taken is liable to bi taken on the process, on which he is required to take it.
*469It has been contended on the part of the defendant, that as an officer, he was not bound to look behind the judgment of Benjamin Haynes, and that he was right in considering his precept conclusive. This, we think, is founded upon a mistaken application of a well known and familiar principle. The judgment and execution are undoubtedly conclusive, that such a judgment was rendered, and the officer must know that it was rendered by a court of competent jurisdiction, which is a sufficient authority to him to execute it. But the execution does not inform the officer what particular property is bound by it, or what fund is liable for its satisfaction. That he must learn by evidence aliunde. It does not depend upon the priority of the judgment or execution, or of the seizure on execution. Nor does it depend entirely upon the priority of attachment on mesne process. One may be prior in point of time, and another in point of right; one may be valid and effectual, and a prior one void for irregularity ; one may continue in force and the other be dissolved. In all cases of this description, and in fact in all cases where the title of the judgment debtor to the property, or its liability to be taken in satisfaction of the execution, is in question, the officer is bound to act upon evidence not apparent upon his precept, but upon information to be obtained elsewhere. It is for this reason, as he must act upon information of his employer, the execution creditor, that he is permitted to require adequate security for his indemnity, in case that information shall prove to be incorrect. The officer must necessarily judge, from the best lights he has, which of the two parties .claiming the same fund has the better title, and pay it over accordingly. But if he wrongfully pays it to a party, who has not a legal title, and refuses to pay it to the party who has a legal title to it, he is liable in an action on the case, to the party who has thus suffered the loss of his legal right. It is the only method in which the conflicting claims of parties so interested can be legally inquired into and settled ; and there is no real hardship in this to a cautious and discreet officer, who may take sufficient indemnity from" either or both of the contesting parties. We think there are many precedents for such actions. Parker v. Dennie, 6 Pick. 230 ; Fairfield v. Bald win, 12 Pick. 388.
*470We are then brought to the question, whether the prior attachment of Benjamin Haynes is dissolved by the proceedings set forth in the agreed statement of facts. The law has long been settled in Massachusetts, that an attachment of property on mesne process continues in force thirty days only after a final judgment for the plaintiff, and that it is dissolved necessarily by a final judgment for the defendant. This latter rule results from the nature of the provision, that an attachment on mesne process, and also on funds in the hands of trustees, creates a lien thereon, in order to secure the payment of such judgment as the plaintiff may recover in that suit, and therefore when it is ascertained by a final judgment, that nothing can be recovered, this lien is of course discharged. A judgment of the Court of Common Pleas is final, unless appealed from, and the appeal entered and prosecuted in the manner provided by law. Such appeal must be entered at the next succeeding term of the Supreme Judicial Court, (or at an intermediate adjourned term in certain cases.) And though in case of accident or mistake an appeal may, on petition, be entered afterwards, yet it is upon the express condition, that no attachment in such case shall be thereby continued in force, but all such attachments shall remain discharged. St. 1791, c. 17 ; Revised St. c. 82, § 24. From these provisions it follows, that if a valid and final judgment is rendered against the plaintiff in the Court of Common Pleas, the attachment is discharged, if the judgment is not duly appealed from, and if appealed from but not entered at the succeeding term of the Supreme Judicial Court, it is also discharged.
But it is contended in behalf of the defendant and in support of Benjamin Haynes’s attachment, that no final judgment in this case, was entered at the Court of Common Pleas in October, 1834, and that the plaintiff, in that case, did not fail to enter his appeal, because no valid appeal was claimed and taken. And then it is contended that if there was no final judgment, the proceedings stood continued by the general order, directing that all matters not acted upon, should be continued to the next succeeding term, and so the cause was after-wards rightly brought forward and continued in the Court of Common Pleas. It appears by the record, that there was a *471demurrer and joinder, and judgment thereon for the defendant for his costs. This is a complete and final judgment apparently, and though the Court may well know and understand that this species of demurrer is intended as a formal proceeding, not decisive of the merits of the case, yet they must also understand that it is a mode of proceeding, by which the parties intend to have a final judgment in the Court of Common Pleas for the express purpose of laying the foundation of an appeal to the Supreme Judicial Court, which can only be taken in case of a final judgment. And unless the party who takes such appeal shall enter and prosecute it, it is universally understood that he abandons his cause, and the other party has nothing to do but file his complaint, ancj have an affirmation of that judgment, as of course. But it is contended, and this is the only ground on which it can be plausibly suggested that this was not a final judgment, that there were certain trustees summoned in that case, who had not been charged or discharged on their answers nor defaulted. Had the judgment on the formal demurrer been for the plaintiff, there would have been some color for this argument. But a judgment against the plaintiff puts an end to all attachments, as well of trustees as others, unless appealed from, and then it becomes wholly immaterial, whether any judgment is rendered or not, in relation to the liability of the trustees. In case of an appeal, they must necessarily follow the cause, because in legal effect, such appeal, if duly prosecuted, is regarded as in the nature of a continuance of the proceedings. But if there is no appeal, or if the appeal is not prosecuted, the trustees are necessarily discharged and entitled to their costs, whether they had effects liable to the attachment or not. Suppose a verdict against the plaintiff or a nonsuit in the Court of Common Pleas, the result would be the same.
But then it is contended, and the testimony of Mr. Parker is offered to prove, that the clerk entered the claim of an appeal, and without any appearance and claim therefor, either by the party or his attorney, and inserted the name of the attorney, as surety on the recognizance, though he had been previously cautioned not thus to insert his name.
That the judgment was rightly entered, on the issue in law, *472after the demurrer was signed and filed, by the attorneys, fo both parties, is not questioned. Whether the evidence offeree by the defendant, that the appeal was not duly claimed, and the recognizance not entered into, can be received, may admit of great doubt, it being in contradiction to the entries on the docket, which are the basis of the record. But it appears to us unnecessary to give an opinion upon that question, because, if the appeal was not duly taken and prosecuted, then the attachment was dissolved by the first judgment of the Court of Common Pleas not appealed from. If it was rightly taken, but not duly entered, then it was dissolved-by not being entered in the Supreme Judicial Court at the next term, so that the question bearing upon the regularity of the appeal, and of the recognizance, are wholly immaterial.
The right of attaching creditors who, as against their common debtor, have equal claims to satisfaction of their debts, must depend upon strict law ; and if one loses a priority once acquired, by any want of regularity or legal diligence in his proceedings, it is a case where no equitable principles can afford him relief; it is a case where the equities are equal, and the right must be governed by the rule of law.
On the whole, the Court are of opinion, that by the proceedings stated in the case, Benjamin Haynes lost the lien which he had once acquired by his prior attachment, in consequence of which the plaintiffs had the prior attachment, and the defendant ought to have applied on their execution the amount of the funds in his hands, and that he is liable in this action for that amount, with interest thereon, by way of damages.