The opinion of the court was delivered by
Magie, J.Upon a rule to show cause and affidavits taken thereunder, an alternative mandamus was issued at the instance of relators, directed to the board of chosen freeholders of the county of Bergen and the board of chosen freeholders of the •county of Passaic, commanding them to “ put a certain bridge lying and being across the Passaic river, between the counties *314of Bergen and Passaic, and commonly known as the Fifth Avenue bridge, in safe condition for public travel,” or to show cause why they had not done so.
To this writ the freeholders of Passaic demurred, as they were entitled to do. Fairbank v. Sheridan, 14 Vroom 82.
At last term the demurrer was held to be bad. The memorandum of the court’s determination shows, that it was adjudged that the duty of defendants to repair the bridge, and their neglect and refusal to perform that duty, were sufficiently charged in the writ.
Relators’ counsel now moves (on notice only to the freeholders of Passaic)—-first, for final judgment on this determination ; second, for leave to issue a peremptory mandamus; and, third, for judgment against the freeholders of Passaic for costs on the demurrer.
Counsel for the freeholders of Passaic concedes the right of relators to judgment on the demurrer, but objects to the issue of a peremptory mandamus. But if such judgment is final, relators seem entitled to a peremptory writ, which is in the nature of an execution in such proceedings. Rader v. Township of Union, 14 Vroom 518. The contention, is, that such judgment is not final, but respondeat ouster. But this view is plainly erroneous. A judgment for plaintiff on demurrer to a plea in abatement is of that nature. On demurrer to a declaration, the judgment for plaintiff is peremptory—quod recuperet. Johnson v. Rowan, 1 Harr. 266; Hale v. Lawrence, 2 Zab. 72; Tidd Pr. 687; Arch. Pl. 352; Gould Pl., ch. 9, § 42.
Since an alternative mandamus is treated as a declaration, the like effect will be given to the overruling of a demurrer to it, and relators will be deemed to have been conclusively adjudged to be entitled to the relief demanded.
The motions for judgment and a peremptory mandamus ask what the record, in this'respect, entitles relators to.
But a court is not bound, in all cases, to permit the entry of a conclusive judgment upon overruling a demurrer. On the contrary, the practice is to permit, under certain circum*315stances, a defeated demurrant to withdraw his demurrer and interpose a plea. This will be done whenever the court is satisfied that he has a substantial defence which can only be-thus interposed. When this permission is granted, it is on the terms that demurrant pay the costs on the demurrer, which terms are required in eases coming under the Practice act. Rev., p. 892, § 280. In Johnson v. Rowan, supra, it was intimated that liberty to plead anew was granted when a meritorious defence was made to appear by affidavit. Doubtless-the court could require the merits of a defence to be thus shown. But in later practice, uncontroverted statements of counsel have sometimes been considered, and, if a substantial, defence thus appeared, permission to withdraw demurrer and plead has been granted. But when it appears that the matter suggested could not be successfully pleaded, permission will be refused. Broadwell v. Denman, 2 Halst. 278.
As the alternative mandamus takes the place of a declaration in these proceedings, the same practice should be followed. If a demurring defendant shows a real ground on which the command of the alternative writ ought not to be made peremptory, which he can only set up by return, he ought to be-permitted to withdraw his demurrer, and make return on like terms as to costs.
I have examined with care the brief of the counsel for the freeholders of Passaic, and have failed to discover any allegation which would require the court to now permit them to-make a return to the alternative writ.
It is first alleged, that the bridge in question is not on a-continuous highway, is not essential to the fullest use of any highway, and is of very little importance. But it is obvious that a return of these facts would not contradict the charge-of a duty on the part of these adjoining comities to maintain this bridge, for, if it is a public bridge, as charged, it is quite immaterial whether the highway is important or continuous,, or how fully it can be used without the bridge.
It is next suggested, that it ought to be determined whether any authority has been conferred-on the freeholders to erect *316.and maintain bridges between two counties, unless by special statutes. The contention seems to be, that no general acts ■confer such power, and the inference is, that there was no .special act covering the case in hand.
But any pleading, founded on a charge of legal duty, must show that duty by proper allegations of the facts out of which it arises. An alternative mandamus is subject to this rule, and will be bad in substance if the duty charged does not ¡arise out of the facts stated. Newark v. Stout, ante, p. 35; Rader v. Township of Union, ubi supra; Freeholders of Mercer v. Pennsylvania R. R., 16 Vroom 82. Both defendants are public corporations. Their duty to do an act depends on, and cannot exist without, authority to do it. If it arose in this case from private statutes, the rule of pleading required that such statutes should have been set Out; if, from the provisions of public statutes, of which the court will take notice as if set out in the pleadings, the rule required that the facts which evinced the applicability of those statutes, and showed that the duty claimed followed therefrom, must also be set out. The question of authority must, therefore, have been raised on demurrer, and passed upon. Defendant ought not to be permitted to raise it again by the proposed return, if such a return would be proper to an alternative mandamus.
Lastly, it is suggested that the freeholders of Passaic have not sufficient funds on hand applicable to this work, and cannot make more appropriations for such purposes until the .fiscal year which commences in May next.
The statements do not make it clear that there are not funds in hand which may be made applicable to this work, under the provisions of the “Act in relation to county expenditures,” approved April 2d, 1878. Rev. Sup., p. 96. But let us assume that the intent is to claim a present inability for lack of funds to obey the command of the writ.
When a public body is without funds in hand, and without ■any clearly apparent means to raise funds for the work commanded to be done by an alternative mandamus, a return to •that effect will not be quashed. Gallager v. Board, &c., 16 *317Vroom 465. ISTor will a public body be compelled to do an act which would violate a penal statute, such as the act making criminal a vote to exceed appropriations. Mabon v. Halsted, 10 Id. 640.
But the excuse proposed to be set up on this point is, that the county is—not permanently—but only temporarily unable’ to raise tlie necessary funds. It is conceded, that within a few months, and before the next term, at which a peremptory writ now issued would be returned, the county will have ample-power for that purpose. Where the duty required by a peremptory mandamus could not be discharged before its return,, this court refused to quash the writ, but extended its return, so as to cover a period within which the act • commanded: might be done. Brown v. Rahway, 22 Vroom 279. If this-excuse be permitted to be now interposed by way of return, it would not be true, in point of fact, at the time when its trutlr or sufficiency could be brought in question. Under such circumstances, to permit it to be set up, would unreasonably protract this litigation.
The result is, that no reason is perceived why the freeholders of Passaic should be permitted to withdraw the demurrer and make a return to the writ and relators are entitled to their judgment.
But the peremptory mandamus cannot yet be issued. The-alternative writ was directed to two corporations, and required: the performance of an act which is charged to be the duty,, not of one, but of both of them jointly. The peremptory-writ must strictly follow the alternative writ, and cannot issue-to compel one county alone to maintain this bridge. The freeholders of Bergen have filed a return to the alternative-mandamus. Until that return is disposed of, the peremptory-writ cannot be issued against that county. The brief of relators’ counsel states that some consent has been given to the issue of a peremptory mandamus against the freeholders of Bergen, but no such consent appears on the files, and they are-not parties to this motion.
*318The motion for a peremptory mandamus must be now •refused, but may be renewed when the record justifies it.
The-remaining question is, whether relators are entitled to -a judgment for costs on the demurrer.
The right to costs must be discovered in some statute or it ■does not exist. Lehigh Valley R. R. Co. v. McFarlan, l5 Vroom 674.
The Practice act gives costs to the plaintiff in any action, on the recovery of debt or damages. By section 279, which seems to be a condensation of a part of section 10 of the “Act -concerning costs/’ approved April 16th, 1846 (Rev., p. 441), costs are given to a defendant who succeeds on a demurrer. If the Practice act applies in this respect to the extraordinary proceeding on mandamus, relators are not entitled to costs, -although they have succeeded on the demurrer, because they have not recovered, and cannot recover, therein any debt or -damages.
The Mandamus act (Rev., p. 630) provides for costs in certain cases. It gives to relators a right to traverse a return, .and provides for a course of pleading thereon to raise an issue ■of fact or law, in the same manner as if an action on the case for a false return had been brought. It then provides that relators, if successful under this course of pleading, shall ■recover damages and costs, as they might have done in such -an action for a false return. The right to recover costs is coupled with the right to recover damages, and is therefore restricted to the case of a return and pleadings thereon. Relators, on the overruling of the demurrer to the alternative mandamus, could not recover damages, and, therefore, cannot be awarded costs.
For this reason, the motion for a judgment for costs must -be denied.