By the Court,
Boise, J.:The determination of this case depends upon the construction to be given to section 539 of the code, page 222. The first subdivision of that section provides that costs shall be allowed to the plaintiff upon a judgment in his favor: “In an action for the recovery of the possession of real property, or where a claim of title ■ or interest in real property, or right to the possession thereof arises upon the pleadings.”
This being an action for a nuisance affecting the use of the real property, the appellants, in order to recover, must prove that they were in the rightful possession of the premises described in the complaint, which were alleged to be affected by the nuisance. The question of ownership of the premises was not a necessary issue but a right of possession was, and as appellants alleged both ownership and possession of the premises, and the respondents denied these allegations, the right to possession was an issue in the case, and brings the case within the last clause of the statute above quoted, where the right to the possession of the premises arises upon the pleadings.
Deference has been made to some New York cases, to show that the appellants are not entitled to costs, but on examination of the statute of that state it is found that the last clause of the section of our statute is not in the New York statute, and the cases cited do not apply.
*110We think the appellants were entitled to full costs, and the judgment of the circuit court will be reversed so far as the question of costs is concerned, and the court below be directed to allow full costs to them.