delivered the opinion of the court:
Defendants, Virginia Newman and Frances Rivers, appeal this cause, consolidated by the trial court, questioning the propriety of the trial court’s entry of judgment on the pleadings for plaintiff, Steven Samek, in an action he filed seeking possession of and eviction of defendants from their respective residential apartments under the Forcible Entry and Detainer Act. Ill. Rev. Stat. 1985, ch. 110, par. 9-101.
Plaintiff is the brother-in-law of both defendants, who live in apartments owned by their sister and plaintiff’s wife, Adelaide Samek, prior to her death. Defendants had lived in their Chicago apartments for 18 and 30 years, respectively. During her lifetime Mrs. Samek executed a quitclaim deed to herself and plaintiff as joint tenants with right of survivorship. Prior to her death, Mrs. Samek executed a will and subsequent codicil which stated that defendants would have an absolute right to lifetime leases to their respective apartments at a rental price of no more than $125 per month. After Mrs. Samek’s death, plaintiff filed a forcible entry and detainer action.
In their pleadings, defendants denied plaintiff’s right to possession and affirmatively asserted that the will and codicil provisions created lifetime leases and/or life tenancies in the apartments for their benefit. Plaintiff responded to this affirmative defense by reciting the language of the will immediately preceding the lifetime lease language which stated: “Fourth: In the event that my husband, Steve J. Samek, shall predecease me or not be alive on the 30th day after the date of my death when I devise ***.” The fourth article of the will was preceded by a provision devising the property at issue here to Mrs. Samek’s husband if he survived her by 30 days. The codicil stated that Mrs. Samek had given her sisters an “absolute right” to live in their respective apartments.
Prior to a ruling on the issue, defendants informed the court that they had discovered the existence of a will executed by plaintiff which was identical and reciprocal in all material respects to Mrs. Samek’s will, giving lifetime leases to defendants. Defendants contend that the second will estopped plaintiff from asserting any right to possession contrary to the provisions of the two wills and requested the trial court to permit them to prove that a contract existed between plaintiff and his wife. The trial court stated that plaintiff’s will had no legal effect in the forcible entry and detainer action and granted plaintiff’s motion for judgment on the pleadings.
On appeal, defendants contend that it was improper for the trial court to enter judgment on the pleadings on the record then before the court and request that the cause be reversed and remanded to permit them to plead any legal or equitable defenses to the action of forcible detainer.
In Illinois forcible entry and detainer actions, “[a] defendant may under a general denial of the allegations of the complaint offer in evidence any matter in defense of the action. No matters not germane to the distinctive purpose of the proceedings shall be introduced by joinder, counterclaim or otherwise. However, a claim for rent may be joined in the complaint, and judgment may be entered for the amount of rent found due.” (Ill. Rev. Stat. 1985, ch. 110, par. 9 — 106.) Thus, certain equitable defenses and counterclaims directly connected with and germane to the right of possession are available. Bleck v. Cosgrove (1961), 32 Ill. App. 2d 267, 177 N.E.2d 647.
In their pleadings, defendants asserted that Mrs. Samek’s will and codicil created lifetime leases or life tenancies to defendants’ benefit. At the hearing on defendants’ motion to strike and dismiss the complaint and plaintiff’s motions to strike defendants’ affirmative defense and for judgment on the pleadings, the court was informed of the recent discovery of an allegedly reciprocal will of plaintiff’s. After defendants’ request for a chance to prove there was a contract between husband and wife estopping plaintiff’s action, the court interrupted defense counsel’s request stating, “[i]f that is true, then your remedy is a breach of contract, not in the defense to the forcible action. Title is not necessary to resolve a forcible action.” The court continued, “[Tjheir remedies for damages would follow, assuming that you are successful, it would have nothing to do whatsoever with the outcome of this action.”
We reverse for the following reasons. A motion for judgment on the pleadings, like a summary judgment motion, submits to the court a pure question of law as to whether or not there is an issue of fact to be tried. (Tomkins v. France (1959), 21 Ill. App. 2d 227, 157 N.E.2d 799.) Moreover, it is clear that contract defenses seeking equitable relief may be germane to the issue of possession in forcible proceedings. (Rosewood Corp. v. Fisher (1970), 46 Ill. 2d 249, 263 N.E.2d 833.) After the trial court’s erroneous statement regarding contract defenses, defendants filed no counterclaim or motion to amend nor was an offer of proof made regarding plaintiff’s will.
However, section 9 — 106 of the Act (Ill. Rev. Stat. 1985, ch. 110, par. 9 — 106) permits, under a general denial, introduction of evidence germane to the issue of possession. Such evidence can be introduced by joinder, counterclaim or otherwise. (Emphasis added.) Section 9 — 106 has been broadly interpreted to mean that where there is a general denial, the “or otherwise” language permits a party to raise an issue by presenting evidence at the hearing; it is not necessary to first raise the issue by a proper pleading. Kelly v. Lunding (1985), 131 Ill. App. 3d 410, 475 N.E.2d 1093.
It is well established that a motion for judgment on the pleadings should be granted only when the trial court is able to determine the rights of the parties from the pleadings alone. (In re Estate of Rettig (1981), 100 Ill. App. 3d 653, 427 N.E.2d 235.) In the present case, defendants raised a defense at the hearing that was germane to the issue of possession, which, if proved, could negate plaintiff’s right to immediate possession. However, they were not given an opportunity to put forth any evidence regarding their contract/estoppel defense. The assertion of this defense, albeit at the hearing rather than in their pleadings, raises the possibility of the existence of an issue of fact precluding judgment on the pleadings. (See Godellas v. Godellas (1973), 11 Ill. App. 3d 871, 296 N.E.2d 876.) Whether a fact issue is present can only be determined by a hearing on the matter.
Accordingly, we reverse the judgment on the pleadings order and remand this cause for a hearing.
Reversed and remanded.
SULLIVAN, P.J., and PINCHAM, J., concur.