Plaintiff brought this action against defendant board to restrain it from further proceeding to erect a bridge across a small stream in Blue Earth county.
The complaint set forth plaintiff’s ownership of a quarter section of land; that defendant had wrongfully entered thereon, threatened *239to appropriate a strip of land 4 rods wide and 80 rods long, for highway purposes, and had commenced to erect the bridge; that there-was no highway at the place where work had been commenced; and that, by reason of the premises, defendant was committing a trespass, to plaintiff’s irreparable injury. Judgment was demanded that a perpetual injunction issue, restraining the trespass, and enjoining defendant from appropriating any part of the quarter section to its use, and from building the bridge thereon. Defendant answered, admitting plaintiff’s ownership of the land, but alleging that this-ownership was subject to an easement for a public highway over the-same along or near the north line thereof. The answer admitted that defendant had entered upon the premises for the purpose of erecting the bridge in question, and averred that by inadvertence and mistake it had commenced work on the bridge outside of the actual limits of the highway, which was actually an easement upon plaintiff’s land; that it had no intention to proceed further at that place, or to erect the bridge there, or at any other place save within the limits of said public highway. The answer then alleged that a public highway had existed and had been traveled for more than 20' years across plaintiff’s land, running easterly and westerly near the-north line, and that in and upon this highway defendant proposed, to erect a public bridge. Then came the following allegation:
“Defendants now and here tender and offer to plaintiff that plaintiff may have and recover judgment against these defendants, perpetually restraining these defendants, each and every one of them, and all persons acting for them or under their direction, from entering in and upon and from trespassing on the premises described in plaintiff’s complaint, from appropriating any part thereof to their-own use, and from building a bridge upon said premises, save and except within- the lawful boundaries of said public highway aforesaid,, and save and except to so remove the material, tools, and implements-so placed upon plaintiff’s premises as aforesaid; and also tender and offer to plaintiff judgment for his proper costs and disbursements incurred herein to this date, including costs and disbursements necessary for the entering and docketing of the judgment herein; but defendants demand judgment against the plaintiff, that plaintiff have and recover no other and further relief against these defendants than as hereinbefore tendered, and that defendants have judgment. *240adjudging and decreeing that there is a public road, highway, and thoroughfare over and across said premises as aforesaid, and that these defendants have leave to enter in and upon said public thoroughfare, improve the same, and erect and construct a public wagon bridge thereon, and that defendants have such other and further relief as may be meet and proper, and for their proper costs and disbursements herein incurred from and after this date, save and except the entering and docketing of said judgment aforesaid.” The reply squarely denied the existence of the highway described in the answer, or that there was or ever had been any public highway upon plaintiff’s land, and the cause was brought on for trial on these pleadings before the court without a jury.
From what we have said, it appears that defendant board admitted it was a trespasser upon plaintiff’s land when it entered upon the same, and in all that had been done towards the erection of the bridge when the suit was brought. The answer admitted the gist of plaintiff’s cause of action as set forth, and offered that judgment might be entered restraining and enjoining all further proceedings in the erection of a bridge at that point, together with judgment for plaintiff’s costs and disbursements theretofore incurred and to be incurred in entering and docketing the judgment. The offer was broad enough to justify an entry of judgment for all that plaintiff was entitled to under his complaint, for, while he demanded that defendant be enjoined from building the bridge on any part of the quarter section, he failed to allege that there was no public highway elsewhere upon his land, or that defendant intended or threatened to erect the bridge at any other point than the one specifically mentioned, or that it was not authorized by law to build the bridge on some other part of his land. And, independent of the offer, the relief to which plaintiff was entitled under the allegations of his complaint could have been had by a motion for judgment on the plead ings.
But, when we analyze other allegations in the answer and in the reply, we find that a new issue had been raised between the parties, and that was whether there was a public highway over and across plaintiff’s land along the north line, as averred in the answer. This was not proper matter for defendant to insert in an answer to a complaint containing the allegations we have referred to, for it was whol*241ly irrelevant; but plaintiff accepted the situation, and put the allegations in issue by denying in an unqualified manner that there was or ever had been any public highway over or across his land at any point, and then proceeded to trial upon this issue, for there was no other issue for trial. Although irrelevant, plaintiff treated this allegation as a proper counterclaim, on which, if established, defendant was entitled to have it adjudicated that it could proceed to erect the bridge. The findings of fact on this single issue were in favor of the defendant, for the court found, in effect, that there was a common-law dedication of a highway over a part of plaintiff’s premises, and about where it was alleged to be in the answer, more than 30 years prior to the time of the trial, and found that for said period of time there had been a well-defined and publicly traveled track along said way, worked upon by the public authorities, and at all times treated as a public highway. The exact center line of this way was found by the court by course and distance, and it was further found that defendant desired to erect the bridge within the limits of this highway at the river crossing. On these findings, judgment was ordered establishing the highway upon and across plaintiff’s land, and authorizing defendant to proceed with the erection of its bridge within the highway limits, and also, in accordance with the admissions, that defendant be forever restrained and enjoined from building the bridge at the point where work had been commenced. The court also ordered judgment against defendant for the costs and disbursements of the action. This appeal by defendant is from the judgment.
On the only issue made by the pleadings, the defendant was the prevailing party, and under our statutes the prevailing party is entitled to recover costs and disbursements of the defeated party. The tender or offer for judgment found in the answer was explicit, and without qualification. As before stated, the plaintiff was entitled to have judgment entered for all that he had shown himself entitled to under the allegations of the complaint. If defendant injected into its answer statements of new matters, not constituting a defense or a counterclaim, thereby seeking to obtain an adjudication upon an irrelevant subject, plaintiff should have promptly objected, and thus eliminated the improper allegations. If, upon the other hand, he chose to put these allegations in issue by a reply, *242and then to voluntarily litigate the question raised, he took upon himself the consequences of defeat, and must abide by the result. On the single issue made by the pleadings, the findings of fact, conclusions of law, with the order for judgment, and the judgment itself, were in defendant’s favor. The only finding of fact, the only conclusion of law, and the entire portion of the judgment favorable to plaintiff cover nothing more than what he was entitled to upon the tender and offer contained in the answer. As there was no controversy between the parties over the right of the plaintiff to prevail on the cause of action set out in the complaint, it follows that the costs and disbursements for which judgment was entered were incurred by plaintiff in an unsuccessful attempt to show that, as alleged in his reply, there was no public highway upon his land. If so, they should not be assessed against his successful adversary.
It is urged by respondent’s counsel that the tender or offer for judgment found in the answer was too indefinite and uncertain to be of value, and that a judgment entered upon it would have been no protection to their client. Under the offer, and, as before stated, independently of the offer, plaintiff could have had judgment on the pleadings for all the relief he had shown himself entitled to on the allegations of his complaint. In so far as the judgment was against defendant for plaintiff’s costs and disbursements, it was erroneous.
On the cause being remanded, the court below will modify the judgment in accordance with these views.