Opinion by
Smith, J.,Joshua C. Armstrong issued a foreign attachment against W. O. Shallcross and Francis Shallcross, which was executed by attaching moneys due the defendants therein. Before its execution, the sheriff required indemnity, whereupon a bond was given him-, signed by Armstrong, and George C. Courtright, conditioned to be void if the obligors “shall and will save harmless and keep indemnified” the said sheriff, his officers, etc., “of and from all manner of suits, action and actions, damages, costs and charges whatsoever, that shall or may accrue to him or them, for and by reason of his or their executing the said writ: and if the said plaintiff shall and will prosecute said plea against the said defendant with effect according to law, and abide the judgment and award of said court.” The action was determined in favor of the defendants. Thereupon the sheriff assigned the'bond to them, and they brought this action upon it; *48their claim being for the interest on the money attached, which was suspended pending the attachment, and the costs in that proceeding. The defense set up is, in substance, that the sheriff had by law no right to require the bond; and that its condition does not embrace the matters for which the claim iti this action is made.
There can be no question as to the validity of the bond. Having been voluntarily given, for a lawful purpose, it may be enforced according to its terms, even though the sheriff had no right to require it: United States v. Hodson, 10 Wall. 395; Slutter v. Kirkendall, 100 Pa. 307; Clark v. Morss, 142 Pa. 311; Sullivan v. Middendorf, 7 Pa. Superior Ct. 71. No further discussion of this point is necessary.
The determination of this case, therefore, turns on the question whether the plaintiff’s claim is embraced in the condition of the bond. This claim cannot be based on the condition to indemnify the sheriff against actions, etc., for executing the writ, and it is not alleged that he has incurred any liability on that score. The plaintiff’s averment in the declaration is “that the said Joshua C. Armstrong failed to prosecute his said action with effect, but on the .contrary thereof has wholly failed therein, and that by reason of the wrongful issuing of the said writ of attachment the said use plaintiffs therein have suffered great loss and damage, to wit: ” the interest on the moneys attached, and costs of the attachment.
The purpose of the bond, as shown by the terms of the condition, and the preceding recital, was manifestly the protection of the sheriff and his officers, and there is nowhere anything to indicate that any protection to the defendants in the attachment was contemplated. Its condition, undoubtedly, embraced any liability which the sheriff incurred through the plaintiff’s failure to prosecute with effect. But it does not extend to an injury sustained by the defendants, unless a right of action against the sheriff thereby accrued to them. As a whole, the condition of the bond is substantially that of a replevin bond. In the action of replevin, the plaintiff’s failure to prosecute with effect makes the sheriff' liable to the defendant for the property replevied, and the condition to prosecute with effect is for his indemnity against such liability. The defendant may, instead of proceeding against the sheriff, take an assignment of the *49replevin bond, and sue on that; but in such suit he can recover only so far as the sheriff might have recovered. And a defendant in an attachment who derives his right through an assignment by the sheriff, can recover no more than the sheriff could recover in an action on the bond assigned. The liability, however, which the sheriff incurs, upon the failure of the plaintiff in replevin to prosecute with effect, does not arise upon a successful defense by the defendant in an attachment. He is responsible neither for the deprivation of property suffered by the defendant, when taken in pursuance of the writ, nor for costs of suit. It is his duty to execute the writ according to its mandate, and thereupon the property on which it is executed passes into the custody of the law. No responsibility rests on the Sheriff for a loss consequent on such custody, in the absence of any neglect of duty on his part.' As well might he be held liable for the deprivation of goods seized on execution, pending a contest respecting the validity of the judgment which has been determined against the plaintiff. A defendant has no cause of action against the sheriff for the regular execution of legal process, whatever his redress against the plaintiff for its Avrongful use. Neither the dictum of Chief Justice McKean, in Fitzgerald v. Caldwell, 1 Yeates, 274, that “the defendant; in such attachment has his remedy against the plaintiff or the sheriff,” nor that of Justice Rogers, in Mackey v. Hodgson, 9 Pa. 468, that “ If the defendant in the attachment has any remedy, it is against the plaintiff in the foreign attachment,” had any bearing on the question before the court. in those cases; the garnishee’s liability, pending the attachment, being the only question there involved. They cannot, therefore, be regarded as authority for the proposition contended for by the plaintiff in the case before us.
The scope of the condition to “ prosecute with effect,” and the liability to interest pending an unsuccessful prosecution, Avere considered by the Supreme Court in Com. v. Wistar, 142 Pa. 373, 384. That was an action on recognizances on appeals from a decree of distribution by the orphans’ court, conditioned that the appellant “shall prosecute his appeal with effect, and pay all costs that may be adjudged against him.” The appeals having been dismissed, the appellees contended that the appellant’s failure to prosecute with effect made him liable for inter' *50est on tbe fund, pending the appeals. The court, however, held otherwise, and, referring to the statutory provisions for a recognizance with this condition, said: “ No authority has been cited to show that in any of the very numerous cases arising under these various sections has it ever been contended, much less decided, that a recognizance in this form is to have the construction contended for in this case.” In Johnson v. Hessel, 134 Pa. 315, upon the affirmance of a judgment in ejectment, on a writ of error by the defendant, it was held that the condition to prosecute the writ of error with effect, in the recognizance, did not extend to payment of the rental value of the land while the writ of error was pending.
The decisions in attachments against fraudulent debtors, under the act of 1869, have little bearing on the question before us. Under that act, the defendant’s right to sue on the bond is not derived from the sheriff, and the penalty of a breach of condition is specifically defined.
The affidavit of defense, in the present case, does not set forth the ground of defense as clearly as might be done. On the other hand, in the view we have taken of the case, the declaration sets forth no cause of action; therefore, a reply by affidavit was not required, and even had none been made, a judgment for the plaintiff would have been erroneous.
Judgment reversed.