delivered the opinion of the court.
*115The plaintiff' in this suit waived the right granted him to amend his complaint after a ruling that it did not state facts determinatiVe of a cause of action, whereupon judgment was entered against him and he took this appeal.
The allegations of the complaint may he summarized as follows: That by verbal contract the plaintiff leased ■ for two years from the defendant a part of a building for a certain monthly rent and set up therein a restaurant and billiard-room; that the plaintiff complied with the terms of the contract, but after two months he was notified by the defendant that the contract was terminated and, having re' fused to vacate the premises, he was sued in unlawful de-tainer in a municipal court wherein it was adjudged that he should vacate the said premises; that he appealed to the district court and prepared a bond for $300 which was exacted of him for the appeal and by an error of the clerk of the municipal court it was made to appear as for $100 instead of $300 and was annulled; that the plaintiff brought certiorari proceedings in the district court to review the action of the municipal court in the action of unlawful detainer, especially the annulment of the bond; that after the writ of certiorari was issued the record of that action was sent up to the district court which later rendered judgment discharging the writ and from that ruling the plaintiff appealed to this court; that while this appeal was pending the defendant moved for and the district court ordered the return of the record in the action of unlawful detainer to the municipal court which, at the instance of the present defendant, executed its judgment by ejecting the plaintiff from the property that he occupied, causing him damages that he estimates in the amount of $1,000.
Although it is alleged in the complaint that as lessee the plaintiff complied with all of the conditions of the verbal contract of lease that he entered into with the defendant for a term of two years, notwithstanding which' he was notified *116two months later to vacate the property and was sued in unlawful detainer and evicted from it, the whole question in’ this case depends principally on whether or not the contract was made for a term of two years, for damages ai~e claimed for non-compliance with that contract, inasmuch as if the contract was for no specified term, it expired monthly for the reason that the rent was paid monthly and the lessor could maintain the action of unlawful detainer under section 1484 of the Civil Code and the plaintiff would have no right of action for damages against the defendant for his having asserted a right given to him by law.
■ It is true that the complaint alleges that the contract was for two years, but as it also alleges that the plaintiff was notified by the defendant that the contract was terminated and that in spite of his having complied with his obligations he was sued in unlawful detainer and ousted from the property, the complaint itself shows that the action of unlawful detainer was based on the question of the- term of the contract and the judgment rendered therein against the lessee necessarily held that the lease had no specified term, the result being that it has been judicially determined between the parties that the contract had no fixed term of duration.
That the judgment in an action of unlawful detainer may be pleaded as res judicata in another suit involving’ the same matter between the same parties has been held by the Supreme Court of Spain in its judgments of March 22, 1907, and October 4, 1912 (Civil Jurisprudence, volumes 106 and 122, pages 684 and 401, respectively), in considering section 1252 of the Civil Code whose provisions are found in section 1219 of our Civil Code. Prom the first of these' cases this is deduced, for although it was held that res judicata was not well pleaded, it was because—
“Although the litigants in this case and those in the prior case are the same, there is a manifest diversity between the things and the causes, because in the unlawful detainer action which was ended by a final judgment of the court of first instance, it decided only the *117existence and validity of tlie lease contract entered into by the Riera brothers and the failure of the lessee to pay the rent, while in the present case and in the second count of the complaint, on which the appeal was taken, the contract and non-payment that were the bases of the unlawful detainer action, now uncontroverted, were considered as supposed, and from the finality of the judgment rendered in that action 'it is argued that only a part of the amount deposited and afterwards delivered to the lessor in order that he might appeal under section 1566 of the Code of Civil Procedure, or the first six of the 11 annuities, whose non-payment the plaintiff also alleged as a basis of the unlawful detainer action, was not owed by the lessee, because the right to claim it was barred.”
The other judgment is still more in point, and considering the plea of res judicata by reason of a prior action of unlawful detainer for non-payment of the rent, it holds that if in the two actions the subject-matter and the cause of action are identical it is res judicata notwithstanding the fact that the second action is given a name distinct from that of the first; that the nullity and inefficacy of the unlawful detainer proceeding prayed for in the first instance by the appellant was decided by the judgment of unlawful detainer that held the contract rescinded; that in sustaining the plea of res judicata and absolving the appellee from the main point of the complaint the trial court did not infringe section 1252 of the Civil Code, and that the law does not provide that in unlawful detainer proceedings another proceeding more ample might be brought for the same purpose, whatever may be the intrinsic justice of its decision. The cases of Torres v. Pérez, 18 P.R.R. 557, León v. Alvarado, 24 P.R.R. 654, and Aguayo v. Ortiz, 26 P.R.R. 668, cited by the appellant to sustain his contention that he can bring this action notwithstanding the unlawful detainer action, are not'applicable to'this case, for what was held in them was that as the purpose of unlawful detainer is to recover the possession of real property, it does not bar the raising in another' action of the question of ownership, a question which is not the basis of this suit. The judgment in the unlawful *118detainer action is res judicata between tbe parties to tbis suit as to whether or not the lease was made without a specified term, and therefore the lessee can not now raise the same question of fact in this action in order to prove that hi's lease was for two years and to recover damages for his having been evicted from the property before that time. The question in the unlawful detainer proceeding was whether or not the contract had a specified term and in it the plaintiff herein should have alleged and proved that he had an, unexpired term of two years in order to be absolved from that complaint.
The judgment appealed from must be affirmed.