MR. JUSTICE SANNER
delivered the opinion of the court.
Appeal from an order granting a motion for a new trial. The grounds assigned in the notice of intention were: Insufficiency of the evidence to justify the verdict, that the verdict is against law, and errors of law occurring at the trial. The first of these grounds is not before us, because the motion was heard on the minutes of the court by a judge who did not preside at the trial, and, as conceded on oral argument by both parties, it was not, and could not have been, granted for insufficiency of the evidence. The second ground is plainly without merit. The respondent does not indicate, nor does the record disclose, any contrariety between the verdict and the instructions. A verdict is *331[1] “against law,” in the sense of section 6794 of the Revised 'Codes, only when it is contrary to the law of the ease as given to the jury in the instructions. (Allen v. Bear Creek Coal Co., 43 Mont. 269, 115 Pac. 673; Previsich v. Butte Electric Ry. Co., 47 Mont. 170, 131 Pac. 25; Melzner v. Baven Copper Co., 47 Mont. 351, 132 Pac. 552.) It remains, then, to ascertain whether the order appealed from can be justified because of errors of law.
The cause originated in the justice court upon a complaint which alleged the letting of a certain dwelling to the defendant, his failure to pay the rent stipulated in the lease, the amount of such rent due, service on July 5, 1911, of a written demand that he' pay the rent due or quit the premises, his refusal to do either, and that he “unlawfully holds and continues in the possession of the said premises * * * without permission of the plaintiff.” The prayer was “for the sum of $290, rent due, for the restitution of the said premises, and for costs of suit.” Issue was joined and the cause tried before the justice of the peace, who, on August 7,1911, found all the allegations of the complaint to be true, ‘ ‘ and that the defendant unlawfully holds possession of the premises described in the complaint after default in the payment of rent,” and adjudged “that the plaintiff do have and recover * * the possession” of the premises “and the sum of $290 as rent.”
The defendant appealed to the district court, and in that court an amended complaint was filed which differs from the original complaint in its failure to specifically state that the defendant was holding, or ever had held, possession without the plaintiff’s permission; but it alleges that: “The defendant refused to deliver up the possession of the said premises until on or about the -day of April, 1912, when he was compelled so to do by process of court duly issued herein.” The defendant answered: (1) Denying any default in the payment of rent, service of notice to pay or quit or voluntary surrender of the premises, and alleging a forcible eviction therefrom: (2) asserting a counterclaim for damages based upon averments that it was the duty of *332the plaintiff to beep the premises habitable by repairing all subsequent dilapidations not of defendant’s causing, which rendered them untenantable, that after he entered into possession such dilapidations occurred in the months of March, April, May and June, 1911, which the plaintiff refused on notice to repair, and which the defendant was obliged to repair, to his total cost — not exceeding the monthly rental in any one month — in the sum of $290; (3) asserting a counterclaim for damages based upon averments that the place was leased to him to be used in part as a rooming-house, and that, on account of the plaintiff’s failure to correct the dilapidations above referred to, defendant lost the use of the rooms and the rents and profits which would have accrued to him from the same; (4) asserting a counterclaim for damages in the sum of $150, based upon injury to his furniture due to water and plaster falling, in consequence of plaintiff’s failure to repair the dilapidations above referred to. The plaintiff by reply put in issue all the affirmative allegations of the answer.
Upon the trial the presiding judge ruled that, possession of the premises having been restored to the plaintiff, the' issue of unlawful detainer was no longer in the case and restricted the plaintiff’s evidence to the issue of unpaid rent. He also refused to admit any testimony in support of the defendant’s last two counterclaims. At the close of all the evidence, the defendant moved for a directed verdict, upon the ground that the amended complaint and the case made under it constituted a material and fatal departure from the cause of action as originally brought. This was overruled, and the court, by instructions given and refused, authorized the jury to find a verdict for rent only, and denied the right of defendant to have an offset for repairs in excess of $72.50, the amount of one month’s rent. The jury returned a plaintiff’s verdict for $217.50 on which judgment was entered.
The contentions are that the motion for new trial was properly granted because the trial court erroneously permitted the case to go to the jury as an action for rent only, because the rulings rejecting evidence in support of defendant’s last two counterclaims *333were incorrect, and because the trial court was wrong in holding that, under the circumstances presented, the defendant could not recoup from rentals more than $72.50 — the amount of one month’s rent — for the repairs made by him.
1. In support of the first contention, it is suggested that the action as brought and determined in the justice’s court was for [2] an unlawful detainer under subdivision 2 of section 7271 of the Revised Codes; as such it came to the district court, and the jurisdiction of that court was limited to the retrial of the cause as presented to the justice’s court; but to state a cause of action under subdivision 2 of section 7271 it must be alleged that the holding of possession after default of rent was without permission of the landlord, and, as there is no such allegation in the amended complaint, it was fatally defective, and upon its filing the district court lost jurisdiction of the cause. This reasoning cannot be upheld. The amended complaint alleges a [3] demand for possession unless the defendant pay the rent, his refusal to surrender or pay, and his retention of the premises until he was compelled by legal process to give them up. This would certainly imply that his possession after such demand was without the plaintiff’s permission, and it was sufficient, in connection with the other allegations of the amended complaint, to characterize the action as for an unlawful detainer after default-in the payment of rent. In such an action — as shown by section 7283, Revised Codes — three things are recoverable, viz., rents, restitution of the premises, and damages; and, while the recovery of all these in this particular kind of action is dependent upon the fact of the unlawful detainer, they are not dependent upon each other. Rents, particularly, sound in contract; they constitute a cause of action in themselves without regard to unlawful detainer; they are recoverable in such an action as this because the statute so declares, -and so far are they from being dependent upon the right to restitution that the tenant, by paying them with interest and the damages, if any, caused by the unlawful detainer, may prevent a restitution as well -as the highly penal judgment otherwise possible. If therefore in the present instance *334it had become manifest in the justice court, either from amended pleadings or from the evidence, that the plaintiff could not establish, or desired to waive, his right to restitution and damages, it was still legally possible for the case to proceed to judgment upon the cause of action for rent; and, if this could be done in the justice court, it could be done on appeal in the district court, since that court proceeds de novo with power over the cause neither greater nor less than the justice’s court. Touching a similar situation to the one at bar, the supreme court of North Dakota said: “The question whether defendant was entitled to possession when the action was commenced became immaterial. The statute permits' a cause of action for unpaid rent to be joined with a cause of action for forcible detainer. The right of possession having been disposed of, the action did not abate so far as the issue as to the nonpayment of rent was concerned. Section 8409, Revised Codes 1905, authorized the joinder of a cause of action for rent with one of possession. The action is strictly one for possession based on a wrongful detainer, and a recovery for rent is permitted in connection therewith. The cause of action for rent was rightfully joined at the commencement of the action, and, because the question of possession has been determined by the withdrawal of defendant from the premises, we discover no reason why the action should not continue in-order that all the issues properly in the case may be speedily disposed of.” (McLain v. Nurnberg, 16 N. D. 144, 112 N. W. 243.)
In our opinion the trial judge had jurisdiction to entertain the cause upon the question of rent only; it was “consistent with the case made by the complaint and embraced within the issues. ’ ’ (Rev. Codes, see. 6713.) Our statute is so worded, however, that . [4] to support a recovery of rents in this action, it was requisite for the plaintiff to establish, and for the jury to find, that there had been an unlawful detainer. Failure on the part of the tidal court to permit this was error. But the error was not available [5] to the defendant upon his motion for new trial, and cannot be urged here, because it was upon his objection that the evidence tendered by the plaintiff to establish the unlawful detainer was *335rejected, and with his acquiescence the trial court proceeded to the close of the evidence upon the theory that the only issue was the amount of rent due. (Dempster v. Oregon Short Line R. R. Co., 37 Mont. 335, 96 Pac. 717.)
2. The rulings refusing to admit the evidence in support of the last two counterclaims were justified by almost unbroken authority. The statutes under which the right to recover upon [6] these counterclaims is asserted are sections 5226 and 5227 of the Revised Codes. These sections, as we are told in the report of the Code Commission, were taken from California, and investigation discloses that they came to us with a construction upon them which leaves no room for doubt. (Van Every v. Ogg, 59 Cal. 563; Sieber v. Blanc, 76 Cal. 173, 18 Pac. 260; Callahan v. Loughran, 102 Cal. 476, 36 Pac. 835.) This construction is to the effect that, if the landlord fails to repair after notice, the tenant may himself repair, within a certain limit, or move out; but he has no redress in damages for injury to person or property consequent upon the landlord’s failure to- repair. "Whether this construction be right or not, it was presumably adopted with the sections themselves, it constitutes a rule of property, and the courts of this state are without authority to alter it.
3. The dilapidations, the cost of repairing which was sought [7] to be offset against the rent, are rather vaguely pleaded as to the time of their occurrence, and the testimony touching the cost and payment for the repairs seems somewhat obscure. It is deducible from the record, however, that these dilapidations were of a character to render the premises untenantable, and that some of them occurred in March, 1911, after the lease was executed, some in April, and some in May. Notice of those in March and April seems to have been given to the plaintiff, and, according to the testimony of defendant, she told him to go ahead and fix things up and she would see, or try to see, that he was reimbursed. If this be true, the limitation expressed in section 5227, Revised Codes, which was the basis for the position taken by the trial court, would not be applicable. Ignoring the statement imputed to the plaintiff, however, still it is not clear that the cost *336of repairing tbe dilapidations occurring in any one month would or did exceed $72.50, the amount of one month’s rent, though the total cost of repairing all of them did exceed such amount. The statute requires the landlord to repair all dilapidations which render the premises untenantable, occurring without the fault of the tenant, and, upon the landlord’s refusal so to do, it authorizes the tenant to make repairs costing not to exceed one month’s rent. Obviously this means that, if a dilapidation occurs which it will require more than the amount of a month’s rent to repair, the tenant may not repair it at the expense of the landlord; but it does not mean that, if a dilapidation occurs in March and is repaired by the tenant after refusal of the landlord at a cost not to exceed one month’s rent, a subsequent dilapidation occurring in April or May cannot be similarly repaired, even though the cost of both together exceed the amount of one month’s rent. When, therefore, under the conditions deducible from this record, the trial judge told the jury that they could not allow defendant’s expenditures for repairs to a greater amount than $72.50 or one month’s rent, we think there was error for which a new trial was warranted.
The order appealed from is therefore affirmed.
Affirmed.
Mr. Chief Justice Brantly and Mr. Justice Holloway concur.
Rehearing denied November 16, 1915.