In an action for the foreclosure of a mortgage, costs are not allowable of course, under section 304 of the Code, but are wholly within the discretion of the court. (Code, §§ 304, 306; Gallagher agt. Egham, 2 Sand. S. C. R. 742.)
In cases of this kind, where the defendant is ready, and offers to pay, or brings into court the amount due on the mortgage, the parties are6at liberty Jo apply to the court for its direction as to the question of costs; and the court under section 306 has a discretion to allow them or not, as may be equitable and just. If the court on such application do allow costs, the amount and the items are distinctly regulated by section 307, unless there be a “ recovery of judgment,” bringing the case as to an additional allowance within section 308. It was held in The New-York Fire and Marine Ins. Co. agt. *61Burrell, (9 How. P. R. 398,) that the statute (2 R. S. 553, § 20,) allowing a defendant to tender to the plaintiff or his attorney an amount sufficient to satisfy the demand with costs to the time of the tender, and providing that if it shall appear on the trial that the amount so tendered was sufficient to pay the- demand and costs, the plaintiff should not be entitled to costs subsequent to the tender, is confined to actions at law, and does not affect actions for the foreclosure of mortgages. I think this conclusion a sound one; especially since in equity suits the costs being discretionary with the court, a tender of them cannot, in many cases, be made with certainty or safety to the rights of the parties.
A different rule prevails in actions coming within the provisions of section 304 of the Code. In such cases, the costs are fixed and certain; and the rights of the parties on settlement before judgment, are declared by section 322. The ruling of Marvin, J., in Pratt agt. Conkey, (15 How. 27,) was in such an action, and is undoubtedly correct.
From these views, it follows that in an action for the foreclosure of a mortgage, where tender is made before judgment, if the parties do not voluntarily adjust the costs, either party may apply to the court for that purpose. If costs are allowed to the plaintiff without entry of judgment, the items and amount are to be governed by section 307. If the court shall be of opinion that the circumstances of the case demand it, the plaintiff may be permitted to take judgment notwithstanding the tender, and thus become entitled to the additional allowance under section 308; or if the equities of the case demand it, the court may refuse costs to the plaintiff; or even award them to the defendant.
This course preserves the discretion of the court as to the allowance of costs in equity cases, in its full vigor, leaving it to be exercised consistently with the equities of each case. Of course, in ordinary cases, the court, by refusing to permit judgment to be entered, would allow no more costs than the amount prescribed by section 307; and where those items had been tendered, the plaintiff would be put to show a satis*62factory excuse for refusing them, or be himself charged with the costs of the application ; and it is so uniformly the practice of the court to allow costs in mortgage cases, that the defendant, in all ordinary cases, should tender those items to avoid the costs of the motion which the court would otherwise be likely to impose upon him. In a case of extraordinary labor or expense, the court by permitting judgment to be entered for the amount tendered, could protect the plaintiff, so far at least as the additional allowance is concerned, from the effect of a tender made upon the eve of a judgment, or after the labor and expense of contesting an unmeritorious defence.
There are no facts disclosed in the case before me, to call for the special interference of the court; and as it appears that the costs allowed by section 307, have been paid, the motion must be denied.
Note. Decided at Erie special term. Affirmed on appeal November general term. 1857, Davis, P. J., Marvin and Green, Justices, and the opinion of justice at special term adopted.