
182 Kan. 770 (1958)
323 P.2d 910
THE CITY OF OSAWATOMIE, a Municipal Corporation, Appellee,
v.
J.A. SLAYMAN and ETHEL SLAYMAN, Appellants.
No. 40,874
Supreme Court of Kansas.
Opinion filed April 12, 1958.
*771 Karl V. Shawver, Jr., of Paola, argued the cause, and Karl V. Shawver, of Paola, was with him on the briefs for the appellants.
Willis H. McQueary, of Osawatomie, argued the cause and was on the briefs for the appellee.
The opinion of the court was delivered by
ROBB, J.:
This action was commenced by the city to require the defendants to move a building they had constructed at the rear of their property. The city contended the action was a suit in equity while defendants claimed it was an action at law. The trial court held it to be an equitable action for mandatory injunction and thereunder required defendants to move their building from the one foot and seven inches which it extended into and over land also determined by that court to constitute an alley. From this judgment granting the mandatory injunction the defendants have appealed.
The pertinent parts of the petition in brief showed that defendants owned lots nine and ten of block eighty-nine in Ellensville addition to the city of Osawatomie, in the center of which block an alley fourteen feet wide ran east from the Missouri Pacific right of way to the west edge of Sixth street. The title to the alley was vested in Miami county and the possession and control was by law vested in the city to prohibit and prevent encroachments and obstructions upon or into the alley and to cause their removal. Sometime prior to 1902 the city and the public generally began to use the alley as a public way and this use has continued openly, notoriously, continuously, and uninterruptedly since that time. In 1909 the city constructed a ten-inch sewer main and has since maintained and now maintains the sewer as part of its general sanitary sewer system. Then followed allegations of defendants' erection of the building and the resulting encroachment on the alley; notice to defendants thereof together with the city's desire to keep the alley open; and the notice that the city attorney was instructed to institute proceedings to compel removal of the building from the alley. Defendants neglected, failed, and refused to remove the building and the city had no remedy at law.
The defendants' answer was a general denial coupled with a demurrer. The answer further provided that defendants and their grantors had owned and paid taxes on lots nine and ten in block eighty-nine for the last fifty years, including the south twenty-five feet of said lots, and were in possession thereof. Defendants denied that the city or the public generally had used the fourteen feet as an alley or as a public way, openly, notoriously, continuously, uninterruptedly *772 or adversely since 1902 or for the past fifteen years and that the city had no right, title or interest in the south twenty-five feet of lots nine and ten.
The trial court struck the demurrer portion from the answer, which is the first error claimed by the defendants, but we think the point that this was shown by the record to be an abuse of discretion sufficient to justify reversal is not well taken and we will not discuss it further.
At this stage of the proceeding, defendants made an oral application to the court for a jury trial but the trial court determined the action to be one in equity for mandatory injunction and denied the defendants' request. This ruling is the next and more serious complaint of error by the defendants.
In its reply the city admitted that defendants and their grantors, as alleged in their answer, had paid the taxes on the land in question for over fifty years. All other allegations of new matter therein were denied.
No issue is made of nor any mention made in the pleadings of a formal dedication by the defendants or their grantors of the strip of land involved nor an acceptance thereof by the public, county or city, so that the alley, if established at all, had to be done by use as such by the public. The city has cited many authorities in support of its contention and the decision arrived at by the trial court that the pleadings establish a suit in equity, but an examination of those cases readily reveals that they contain elements entirely absent or distinctively different from those appearing in this record. The petition alleges that by public use the alley was established and the defendants, by their answer wherein they deny the public use, put this question in issue. We are not considering anything but the pleadings at this time and the evidence or the weight thereof is not affected by what we will here discuss.
If the pleadings present an issue of fact for trial, such issue must be tried by a jury unless a jury is waived. When a demand for a jury is made, the court is required to determine from the pleadings whether a party is entitled to a jury trial. (Goodman v. Cretcher, 129 Kan. 551, 283 Pac. 616.) In the early case of Cemetery Association v. Meninger, 14 Kan. 312, 317, it was said that if a highway may be proved by usage, whether that usage also proves an intention on the part of the owner to dedicate and an acceptance thereof by the public are questions of fact which in their nature are *773 eminently appropriate for the consideration of a jury and are not matters of law for determination by the court.
This case was cited in Oliphant v. Comm'rs of Atchison Co., 18 Kan. 386, where the court said that the public acquires no right to possession of a highway by mere prescription  any sooner than an individual does to land he occupies.
In determining what action is alleged in a petition, the designation given the pleading is not the deciding factor because a court must look to substance and not to form. (Russell v. Bovard, 153 Kan. 729, 734, 113 P.2d 1064.) See, also, Gordon v. Munn, 83 Kan. 242, 111 Pac. 177, where the court stated:
"Such an adjudication would necessarily give to the successful litigant the right to the exclusive possession of the property and effectually bar the other litigants from such right. For all practical purposes it would result in a recovery of the possession of the property from one party and an award of it to the other, which would seem to embrace all the essential features of an action of ejectment...," (p. 245)
and it was held that the question must be tried to a jury if either party so requests. In the earlier but similar case of Atkinson v. Crowe, 80 Kan. 161, 102 Pac. 1050, it was also stated:
"In an action commenced for the purpose of settling disputed questions of title to real estate, and to recover the possession thereof, either party is entitled to a jury as a matter of right, regardless of the form in which the action may be brought." (Syl. ¶ 1.)
As before stated, the city contends this petition designates an action for mandatory injunction but we think the averments therein show it to be one ultimately involving the right to possession. In an early mortgage foreclosure case it was held that although the action was in form one to foreclose a mortgage and obtain judgment on a promissory note, the record disclosed the action had the ulterior purpose of determining rights to the property or to recover possession of the property and the refusal of the trial court to grant a request for a jury trial was there held to be error. (Busenbark v. Park, 6 Kan. App. 1.) Similarly, in Parris v. Oil Co., 108 Kan. 330, 195 Pac. 879, which began as a quiet title action, a change of circumstances occurred when defendants entered into possession, as shown by defendants' answer, and plaintiffs' reply sought relief appropriate to ejectment. It was there also held the trial court erred in refusing to grant plaintiffs' request for a trial by jury. In its opinion in the Parris case this court gave a very good reason for *774 the foregoing rule when it stated that the facts as found by a jury may not fully coincide with the findings made by a trial court.
In addition to what has already been said herein regarding the claim by the city that the alley existed and especially in connection with the cases of Cemetery Association v. Meninger, supra, and Oliphant v. Comm'rs of Atchison Co., supra, we have the element of adverse possession which carries with it a right to trial by jury. (2 C.J.S., Adverse Possession, § 228, pp. 855-864; 1 Am. Jur., Adverse Possession, § 251, p. 930; 1 Hatcher's Kansas Digest, rev. ed., Adverse Possession, § 34, p. 52; 2 West's Kansas Digest, Adverse Possession, § 115, p. 137.)
Summing up, then, what we actually have before us in this case and applying the rules of the foregoing authorities, the form of the petition, as contended by the city and determined by the trial court, presents a suit in equity for a mandatory injunction but when we consider the substance of all the pleadings involved, we find an action in ejectment by the city based upon a public use and adverse possession which under our statute (G.S. 1949, 60-304, Fourth) has to be for a period of at least fifteen years. If the alley were created at all, it would have had to have been by prescription as a result of public use. For further discussion on this subject, see Transue v. Croffoot, 179 Kan. 219, 294 P.2d 216; Taylor Investment Co. v. Kansas City Power & Light Co., 182 Kan. 511, 322 P.2d 817. The city would then have been entitled to possession but the defendants were in actual possession by reason of their having constructed a building (an encroachment) upon the alley. Thus was created the necessity for an action in ejectment, the issues of which had to be submitted to a jury because of the timely request therefor by the defendants. Since the gist of the action also involves prescription by adverse possession and public use, which presented at least mixed questions of law and fact, when defendants requested a jury trial to determine those features, they were entitled thereto as a matter of right.
We are compelled to hold that the trial court committed reversible error in refusing defendants' timely request for a jury trial. Therefore, a new trial must be and is hereby ordered and the request of the defendants for a trial by jury allowed so that the issues of fact, as stated, may be submitted thereto.
JACKSON, J., not participating.
