The overruling of the demurrer is assigned as error. [1] Defendants contend that the complaint is insufficient (1) in that it is not alleged therein that the plaintiff was entitled to the possession of the premises at the time of the commencement of the action, and (2) in that it is not alleged that plaintiff demanded possession of the defendants before bringing the action. The action was brought under section 7271 of the Revised Codes, which so far as is pertinent here, declares: “A tenant of real property or mining claim for a term less than life, is guilty of unlawful detainer: 1. When he continues in possession, in person or by subtenant, of the property, or any part thereof, after the expiration of the term for which it is let to him, without the permission of the landlord, or the successor in estate of his landlord, if any there be, but in case of a tenancy *499at will, it must first be terminated by notice, as prescribed in tbe Civil Code. ’ ’ Tbe provisions of tbe Codes of which this section is a part (sections 7269-7288) deal with the subject of summary proceedings to obtain possession of real property. They specifically authorize actions for forcible entries and detainers, and unlawful detainers, and define the circumstances under which each one lies. The circumstances under which the former two actions may be maintained, and the allegations of fact necessary to be made, are discussed somewhat at length in Kennedy v. DicMe, 27 Mont. 70, 69 Pac. 672, and Spellman v. Rhode, 33 Mont. 21, 81 Pac. 395. "What is said in these cases has no pertinency here, because section 7271 deals wholly with the relation of landlord and tenant. The allegations necessary to sustain an action in either of the former cases being inappropriate to sustain the latter, we must look exclusively to the latter to ascertain what the plaintiff must allege. Upon an analysis of this section we find it is necessary for it to appear (1) that the plaintiff is the landlord, or his successor in estate; (2) that the • defendant became possessed of the property by virtue of a lease for a term less than for life; (3) that he has continued his possession, in person or by subtenant, after the expiration of the term specified in the lease without permission of the plaintiff or his successor; and (4) if the tenancy is at will, that it has been terminated by notice as prescribed by section 4502 of the Revised Codes. Nowhere in the section, nor in section 7276, which prescribes what must be set forth in the complaint, is there any requirement that plaintiff allege ownership or right to the possession, or that demand has been made for delivery of possession. In contemplation of law, the right to the possession is a necessary inference from the allegations showing the relation of landlord and tenant, and the expiration of the term of the lease under the stipulation in the contract fixing the time -of its duration. So, too, the right of the [2] landlord