The statutory petition to redeem is an action of a nature sufficiently equitable to bring the plaintiff within the rule that he who seeks equity must do equity (Proctor v. Green, 59 N.H. 350, 352); and this rule does not allow him to avoid the agreed priority of the last mortgage. Story Eq, s. 64 e. His agreement can be enforced in an action brought by the defendant for specific performance; and there is no occasion to put the parties to the expense of another suit. Gillig v. Maass, 28 N.Y. 191, 213, 214. The plaintiff's judgment for redemption will contain a *Page 260 condition that the plaintiff pay the fifth mortgage as well as the third, or file with the clerk, for the defendant's use, a sealed instrument that will give the fifth indisputable precedence; or the judgment will be drawn in some other form that will give the defendant the specific relief to which he is entitled.
Case discharged.
STANLEY, J., did not sit: the others concurred.