The defendant challenges the validity of the judgment entered in the court below on jurisdictional grounds. A magistrate has jurisdiction in an ejectment action only when there is a contract of rental and the relation of landlord and tenant exists between the plaintiff and the defendant.
“The jurisdiction of a justice of the peace in civil actions for recovery of possession of real estate is entirely statutory' — and is derived from the landlord and tenant act providing for summary ejectment. (Statute cited.) Such jurisdiction may be exercised only in cases where the relationship of landlord and tenant existed within the terms and meaning of the landlord and tenant act, and where the tenant holds over after *258expiration of the term. (Authorities cited.)” Simons v. Lebrun, 219 N.C. 42, 12 S.E. 2d 644; Ford v. Moulding Co., 231 N.C. 105, 56 S.E. 2d 14; Howell v. Branson, 226 N.C. 264, 37 S.E. 2d 687.
While it is true that a justice of the peace has no jurisdiction to try an action in which the title to real property is at issue, if the defendant in a summary ejectment proceeding wishes to assert that the title to real property is in controversy and will arise in the trial of the action, he must plead his defense by written answer signed by him or his attorney. G.S. 7-124. The title to real estate cannot be drawn into controversy by the defendant on a trial in a justice’s court except by delivering to the justice an answer in writing that such title will come in question. Evans v. Williamson, 79 N.C. 86. And his answer must be supported by evidence. Jerome v. Setzer, 175 N.C. 391, 95 S.E. 616.
Furthermore, even if we concede that the defendant has raised the issue, there is no evidence in the record which tends to show that the title to real estate is involved in this action. The defendant voluntarily, by and with the consent of the Welkers, canceled his binding contract to purchase the premises and withdrew his deposit of earnest money. Pie thereby terminated the contract. He then leased the premises and entered into possession thereof as the lessee of plaintiff’s predecessor in title and paid rent thereon for three months. He received due notice to vacate. Hence the peremptory instruction of the court about which the defendant complains is warranted by the record.
The peremptory instruction was warranted for still another reason. The person who enters into the possession of premises as the tenant of another may not deny the title of his landlord.
“It is recognized as the general rule that a tenant is not allowed to controvert the title of his landlord or set up rights adverse to such title without having first surrendered the possession acquired under and by virtue of the agreement between them.” Lawrence v. Eller, 169 N.C. 211, 85 S.E. 291; Carnegie v. Perkins, 191 N.C. 412, 131 S.E. 750, and cases cited.
“In Perry v. Perry, 190 N.C. p. 126, Varser, J., speaking to the question says: ‘Of course, as stated in Davis v. Davis, 83 N.C. 71, if the defendant did enter as tenant of the plaintiffs or became such after entry, then he is estopped to deny the plaintiffs’ title (16 R.C.L. 469), or to assert title to himself (16 R.C.L. 657) until he has restored the possession to the plaintiff, but he may contest the issue of tenancy by any competent evidence.’ ” Carnegie v. Perkins, supra.
It is immaterial whether the defendant entered into possession of the premises before or after he procured the cancellation of his contract to purchase. It is uncontradicted that the contract was canceled and defendant remained in possession as tenant. Carnegie v. Perkins, supra. *259Furthermore, the record is devoid of any evidence which tends to bring the title to the premises in issue in this cause.
The case just cited (Carnegie v. Perkins) is almost on all fours, and the identical questions raised in that cause were resolved against the tenant.
The judgment entered in the court below must be
Affirmed.