delivered the opinion of the court.
Ana Maria Sugar Co., Inc., a corporation organized under the laws of Puerto Rico, filed in the District Court of May'agüez a suit against Antonio Santos to rescind a contract of lease of two rural properties entered into between the plaintiff and the defendant, and to recover from the latter the sum of $1,859.94 for rent due and unpaid, together with interest thereon and costs. The defendant was summoned but he failed to answer, and his default was entered on March 7, 1932.
In this situation, on the 15th of the same month, South Porto Rico Sugar Company of Porto Rico asked leave to intervene in this suit and alleged that the sugar cane growing on the leased properties had been attached for the payment of the rent claimed by the plaintiff, and that it was the .owner of a preferred credit for advances (crédito refaccionario); and such leave having been granted, it filed its complaint in intervention on March 28, 1932.
On the following day, both the plaintiff and the inter-vener submitted their case to the court below upon a stipulation, which in its pertinent part reads as follows:
“I. That the parties herein are in accord, and in agreement as to the facts hereinafter set forth, and disagree only as to the effect of such facts upon the respective claims of the parties, to collect, with preference over one another, out of the crops (frutos) existing on the properties described in the complaint in this case, the credit for rent on the said properties owned by the plaintiff Ana Maria Sugar Co., Inc., and the credit for advance’s which the intervener South Porto Rico .Sugar Company of Porto Rico holds upon the said crops.
“II. That in order to settle said disagreement as to the preference to be accorded to the respective credits of the parties herein, *65the latter have stipulated and agreed to submit to the decision of this Hon. Court the questions of law involved, after a hearing to be held on such a date as the court may determine in agreement with the parties.
“III. That the facts involved in this case, and upon which the parties herein have agreed, are as follows:
“1. That by a deed No. 13, executed in this city on April 29, 1929, before Notary J. Alemañy y Sosa by Ana Maria Sugar Co., Inc., and Antonio Santos, who are respectively the plaintiff and the defendant in th's action, Ana Maria Sugar Co., Inc., leased to Antonio Santos the properties described in paragraph 2 of the complaint for a term of five years beginning‘May 1, 1929, and for an annual rental of $1,200 payable semi-annually.
“2. That it was stipulated in the said contract of lease that any improvements existing on the leased properties at the termination of the lease would be for the benefit of the lessor, without any requirement of payment by the latter therefor and as a part of the consideration in said contract.
“3. That on July 9, 1929, the intervener South Porto Rico Sugar Company of Porto Rieo recorded in the Registry of Agricultural Contracts of the Municipality of Mayagüez, in the Registry of Property of that city, a contract of advances for agricultural purposes and grinding of. cane, entered into between the defendant Antonio Santos, as lessee, and South Porto Rico Sugar Company of Porto Rico, as crop loan creditor, upon the properties described under the letters A and B in the second paragraph of the complaint, covering the grinding seasons from 1931 to 1935 inclusive, in which contract the lessee defendant herein, Mr. Santos, appeared as tenant holding under a lease of said properties, which belong to the plaintiff Ana Maria Sugar Co., Inc.
“4. That on February 18, 1932, the plaintiff Ana Maria Sugar Co., Inc., notified the intervener South Porto Rico Sugar Co. of Porto Rico that the lessee Antonio Santos was owing the rent on the properties . . ., by a letter ...”
(Here the letter is copied in full. It says in part as follows :)
“ . . Therefore, on behalf of my aforesaid client, and for the purposes of the Act regarding agricultural advances and grinding of cane now in force, I hereby make demand upon you for the payment of the sums above stated, which Mr. Santos owes as rent on *66the said properties and unpaid taxes and I warn you that, upon your failure to pay the said sums by return mail, Ana Maria Sugar Co., Inc., will resort to judicial proceedings for the purpose of collecting from the crops existing on the said properties the rental and the taxes owed by Mr. Santos . . .’
“5. That on February 19, 1932, the plaintiff Ana Maria Sugar Co., Inc., instituted in this Hon. District Court an unlawful detainer proceeding against the defendant herein Antonio Santos to evict him from the aforesaid leased properties for nonpayment of the same rent, which Ana Maria Sugar Co., Inc., had notified .South Porto Rico Sugar Company of Porto Rico that the said lessee Antonio Santos owed; and that on February 19, 1932, the plaintiff herein Ana Maria Sugar Co., Inc., filed its complaint in this case against defendant Antonio Santos for the rescission of the said contract of lease and the recovery of the said rent due and unpaid.
“6. That on February 19, 1932, and in the said suit for rescission of contract and recovery of rent due, the plaintiff Ana Maria Sugar Co., Inc., to secure the effectiveness of the judgment that might be rendered in the action, moved for and obtained from this Hon. Court an order of attachment of property belonging to the defendant, Antonio Santos, in an amount sufficient to cover the principal sum of $1,859.94 for rent due and unpaid and accrued taxes on the leased properties for the last three years, and an additional credit of $600 for interest on arrears of rent, costs and. attorney’s fees; and that the said attachment was levied by the marshal of this Court on February 19, 1932, pursuant to a designation made by the plaintiff Ana Maria Sugar Co., Inc., upon all mature sugar cane fit to be cut and ground in the current 1931-1932 crop and upon all new cane and sprouts fit to be cut and ground in the next 1932-1933 crop, belonging to the defendant Antonio Santos and which were then planted and under cultivation on the leased properties described in the complaint; and that Félix Cesani was appointed a custodian of the said canes by this Hon. Court and assumed his duties as such on February 19, 1932.
“7. That on February 27, 1932, the intervener South Porto Rico Sugar Company of Porto Rico, through its attorney, Miguel A. Garcia Méndez, Esq., replied to the letter which had been addressed to it by Ana Maria Sugar Co., Inc., on February 18, 1932, through its attorney, J. Alemañy y Sosa, in the following terms: ’ ’
(Here the reply is copied in full. It reads partly as follows :)
*67' ‘ ‘. . . I bave no doubt that yon realize perfectly that South Porto Rico Sugar Co., in its' capacity as crop lienor, can not be prejudiced by any action of debt or of unlawful detainer that you may institute against Mr. Santos, because with regard to the cane' growing on the property leased to him, the credit arising from the agricultural contract, which the South Porto Rico Sugar Co. has duly recorded in the registry, enjoys preference over the credit for rent on that property owned by your' client. Even in the event that you should take possession of the property, Ana Maria Sugar Co., Inc., is bound to perform the record contract for advances as regards the cane contracted for during the life of the said contract to reimburse the sums advanced by the South Porto Rico Sugar Co. under such contract. Naturally, I interpreted, your letter from the beginning rather as a notice to South Porto Rico of the default of the lessee in case the former should decide to take up the lease, knowing beforehand that you admit that that corporation can not be responsible for the failure on the part of your client to demand from Mr. Santos some security for the payment of the rent due * *
“8. That on March 7, 1932, there was held the trial in the unlawful detainer proceeding, brought by the plaintiff Ana Maria Sugar Co., Inc., against the defendant Antonio Santos to evict him from the leased properties for default in the payment of the aforesaid rent due, and on the same day this Hon. Court rendered a judgment in favor of the plaintiff and ordered the dispossession and eviction of the defendant from the said properties; and that immediately thereafter, and by reason of the voluntary surrender and abandonment by Antonio Santos of the properties which were the object of the said proceeding, the plaintiff Ana Maria Sugar Co., Inc., took actual possession of the said properties and has ever since occupied the same.
“9. That on March 15, 1932, the intervener South Porto Rico Sugar Co. of Porto Rico filed in this case a motion and a complaint in intervention, in which it alleged that the cane now planted on the properties described in the complaint under letters A and B, including that ready to be harvested during the present grinding season as well as that corresponding to subsequent crops, had been planted and cultivated by the lessee of said properties, Antonio Santos, with funds furnished by the intervener South Porto Rico Sugar Company of Porto Rico in accordance with the stipulations of the' agricultural contract for advances and grinding of cane existing between said lessee Antonio Santos and the intervener South Porto Rico Sugar *68Company of Porto Rico; that of the moneys advanced by the in-tervener, South Porto Rico Sugar Co. of P. R., to the said defendant, Antonio Santos, under the said contract for advances and grinding of cane the defendant Antonio Santos, owes the intervener South Porto Rico Co. of P. R. the sum of $3,214.88, according to a liquidation made on February 29 of the present year of 1932, exclusive of interest; and that, therefore, the cane covered by the contract recorded in the name of the intervener and which is planted on the properties leased by the defendant from the plaintiff, belongs to the former by virtue of the said contract recorded in the name of said intervener, and- it prayed for a discharge of the attachment levied upon the said cane by the plaintiff Ana Maria Sugar Co., Inc., and for the annullment of the appointment of a custodian thereof, and that the proper orders and decrees be issued to the end that the in-tervener, its agents or representatives, be not hindered by the plaintiff or by any othe'r person in the harvesting or other incidental work to be done upon the said plantations.
“10. That the plaintiff Ana Maria Sugar Co., Inc., has no objection to the filing of the complaint in intervention by the intervener South Porto Rico Sugar Co. of P. R. regarding the preference of credits; but it is stipulated and agreed that the parties consider as denied and answered all the allegations of the said complaint which may be adverse to the contention of the said plaintiff as set forth in this stipulation.”
Regarding the cutting of the cane, it was further stipulated as follows:
“Pending a final determination of this matter as regards the cane existing on the leased properties and which is fit to be cut during the present grinding season, the parties have agreed that the custodian appointed by this Hon. Court, Félix Cesani, shall cause such cane to be cut, with the intervention of the intervener South Porto Rico Sugar Company of Porto Rico, who shall be notified thereof, and that the said cane shall be ground by said custodian in the sugar factory of the South Porto Rico Sugar Co., subject to the stipulation that the amounts of the monthly liquidation from such cane, after deducting therefrom the advances for cutting and transportation of the cane, shall be deposited in the office of the clerk of this Hon. Court by the said custodian .in order that the total proceeds of such liquidations may be awarded in accordance with the result of the action herein. ’ ’
*69The court took the case under advisement and decided it against the plaintiff by a judgment of October 9, 1933, which it reasoned in part as follows:
< ( % * * # * * &
“The plaintiff maintains that although the agricultural contract for advances and the grinding of cane is a preferred lien, the applicable sections of the Act of March 10, 1910, as the same were amended in 1925, only acknowledge to the crop loan creditor, where the lessee has defaulted in his obligations to the owner of the properties, the right, upon learning of such default, to perform such obligations for account of the debtor and charge the same to the crop loan account, before he can exercise his right of preference. The intervener contends, on the contrary, that the preferred claim which it has upon the fruits of the properties by virtue of the contract it made with the lessee and defendant, Antonio Santos, is valid and enforceable as against the lessor, Ana Maria Sugar Co., Inc., in accordance with the Act of March 10, 1910, as now in force, and the provisions of the Civil Code regarding the classification and preference of credits; and that the preferred lien on the said crops is not destroyed or overcome, even though a judgment should be rendered in favor of the plaintiff for nonpayment of the rent, because in its opinion the change of possession would simply constitute a transfer by operation of law.
“After a careful consideration of all the allegations and contentions of the parties herein, this court is of the opinion that it must, and does hereby HOLD that in accordance with the applicable law now in force in Puerto Rico, the credit for agricultural advances and grinding of cane duly recorded in the registry of property in the name of the intervener South Porto Rico Sugar Company of Porto Rico, is a preferred credit and entitled to priority of payment over the credit for rent due to the plaintiff Ana Maria Sugar Co., Inc., with regard to the fruits of the properties which were the object of such advances and which by stipulation of the parties, were gathered in the 1932 crop and the proceeds thereof deposited in the office of the clerk of this court to abide the event of this action, by the custodian appointed by this court pursuant to the stipulation made by the parties for that purpose.
“Secion 1826 of the Civil Code of Puerto Rico (1930 ed.), in its pertinent part, reads as follows:
*70“ ‘Credits which enjoy preference with, regard to certain personal property escinde all the others to the extent of value of the personal property to which the preference refers.
“ ‘When two or more creditors claim preference with regard to certain personal property, the following rules shall he observed as to priority of payment:
“ ‘1. Credits secured by a pledge exclude all others to the extent of the value of the thing given in pledge.
“ ‘2. In ease there' is a security, should the latter be legally constituted in favor of more than one creditor, the priority between them shall be determined by the order of the dates of the execution of the guaranty.
“ ‘3. Credits for advances for seeds, expenses of cultivation, and harvesting, shall be preferred over those for rents and leases, with regard to the fruits of the crop for which they were' incurred. ’
“As may be seen, besides enjoying the general preference granted by section 1824 and proceeding sections of the Civil Code, the credit owned by the intervener is entitled to priority of payment over the credit belonging to the lessor in this case for rents and leases with regard to the fruits of the crop.
‘ ‘ Section 1827 of the same code also applies because in the opinion of this court the value to which the preference refers in this case is represented by the sum of $436.33, deposited in court, and the in-tervener’s credit excludes all others as to the payment of the said sum, inasmuch as the latter does not exceed the amount of the preferred credit due ,the outstanding balance of which amounts t o$3,214.88 and interest.
“Section 4 of the Act of March 10, 1910, regarding contracts of advances for agricultural purposes and grinding of cane, as amended by Act, No. 66 of August 1, 1925 (Session Laws, p. 342) is clear. The intervener in this case did not elect to continue the cultivation of the subsequent crops on the leased properties, for which purpose it might subrogate itself in the obligations of the debtor, Mr. Santos, to the plaintiff Ana Maria Sugar Co., Inc.,' in accordance with the provisions of subdivision second of section 3 of the said act; but it chose to request of the plaintiff that it be permitted to gather and receive the growing fruits corresponding to the 1932 crop and elected to demand the right to be indemnified out of the proceeds of the fruits gathered up to the amount of its credit, whereas, as a matter of fact, it only collected a sum equivalent to less than % of the *71amount due' to the said intervener by reason of the moneys advanced to the defendant for the purpose of raising said-crop of 1932.
í i ifc ¿fc ? ?
Thereupon the plaintiff took the present ¡appeal, and it has assigned in its brief three errors, which we- will consider jointly, as in our opinion they involve a single; question, to wit: Which of the two credits is paramount, that.of the plaintiff or that of the intervener?
It is admitted that the plaintiff is the owner of the properties involved; that Antonio Santos leased them from plaintiff and failed to fulfill his contract, whereupon the properties reverted to the actual possession of the plaintiff while Santos owed the latter over a thousand dollars for unpaid rent; that while the lease was in force, Santos enteréd into a contract for advances and grinding of cane with the inter-vener for the purpose of cultivating, as he did, on the leased properties sugar cane, and finally owed the intervener a sum also in excess of one thousand dollars; that the contract for advances was recorded in the registry on July 9, 1929; that on February 18, 1932, the plaintiff notified the intervener of the default on the contract of lease on the part of Santos and the intervener refused to perform such contract itself; and that the harvesting of the cane, which stood on the properties at the time the plaintiff took possession thereof, yielded less than $1,000, which is now deposited in the district court.
Both the plaintiff and the intervener claim a preferential right to collect their respective credits out of the proceeds of the cane, that is, from the fruits cultivated on the properties by reason of the crop loan contract. This conflict, of .claims having been submitted to the determination of the district court, it was decided in favor of the intervener. ■ The plaintiff now urges that this Supreme Court should reverse the; judgment of the district court and decide the controversy in its favor.
*72We stall now make an analysis of the applicable statute., which is the Agricultural Loan Act (Ley sobre contratos de refacción agrícola y molienda de. cañas) of 1910, as amended Civil Code (1930 ed.), p. 402 et seq.
By the express terms of the act a crop loan contract may be entered into, not only with an owner of rural property, but also with a lessee thereof. “Any landholder,” section 3 provides, “or any natural or artificial person, whether as owner, possessor, lessee, or usufructuary of rural property or of buildings and machinery devoted to agricultural or industrial uses in connection with the cultivation or manufacture of any agricultural product, may enter with third parties into a contract of advances for agricultural purposes as defined in section 1 of this Act.” And then it adds:: “Where the lessee or usufructuary under any title shall fail to perform his obligations to the owner, or representative of the property, the creditor making the advances for agricultural purposes may, on having knowledge of the fact, fulfill such obligations for account of the debtor and charge the same to the account of advances for agricultural purposes.”
The plaintiff maintains that as the intervener did not. take advantage of this only opportunity which the law afforded to it, it has no right of priority whatever to collect any amount owing to it under the contract of advances out of the fruits of the properties involved.
The intervener insists that notwithstanding it has not subrogated itself in the place of the lessee by paying the' rentals, which the latter failed to pay, its right is paramount to that of the plaintiff with regard to the proceeds of such fruits by virtue of the said act and the Civil Code.
Indeed, section 4 of the act provides that “the crop loan credit, from the date it is filed in the registry . . . shall have preference over other subsequent credits of any kind during the years stipulated in the contract . . . except the tax lien in favor of The People of Porto Rico. ...”
*73There is no question that the provisions of section 4 are closely connected with those of section 3. In onr judgment, in order that the preference may continue in full force during the whole term of the contract it is necessary that, where the lessee fails to perform, his crop loan creditor should perform for him; hut this does not mean that the latter should lose entirely his preference with regard to the fruits existing on the properties at the time that the lease terminates or is declared rescinded.
The situation which arises in such case is not expressly foreseen in the act and must, therefore, he adjusted by construing the provisions of the statute as a whole and the applicable precepts of the Civil Code, which were invoked by the intervener from the beginning and applied by the trial court in rendering its judgment.
Apart from the holding of the U. S. Circuit Court of Appeals for the First Circuit in the case of Molina v. Muñoz, 31 F. (2d) 727, regarding the applicability to a case like the present one of the provisions of section 8 of the act, which holding, if literally applied, would suffice for an affirmance of the judgment appealed from herein, as we understand that in the cited case the controlling fact was that the creditor eventually assumed the place of the lessee and the contract of lease thereby remained in full force, it can not be denied that the purpose which permeates the entire statute is to guarantee, with the crops, the right of the person who made them possible by financing the planter, such guaranty to have preference over all other creditors of the latter with the only exception provided by the third section of the act. Nor can it be denied that the legislator has clearly provided in the Civil Code that all credits for advances for seeds, expenses of cultivation and harvesting enjoy preference over those for rents and leases with regard to the fruits of the crop for which they were incurred. Section 1826 of the Civil Code (1930 ed.)
*74It seems advisable to transcribe here section 8 of tbe said act and an excerpt from the cited opinion .of the Circuit Court interpreting that section and applying it to the case of a contract for advances executed by a lessee, -where, the possession of the property reverted to the landlord by virtue of the lessee’s eviction. . .
Said section 8 provides:-
“That such entries and marginal notes of entries as may be made in the ‘Registry of contracts for agricultural purposes’ shall be to the prejudice of and binding upon third parties, from and after the filing of the respective documents. If, while the lien is in force, the products encumbered are disposed of by the debtor to a third party, the creditor making the advances for agricultural purposes shall have a right to obtain from the latter the delivery of the said products or the proceeds of the sale thereof, in case the return of the products is impossible.
“If after the recording of a contract for agricultural advances and the grinding of cane, the cane which is the object of the contract, or any interest therein, or the factories or centrals at which the said cane is to be ground, shall be transferred voluntarily or by operation of law, the transferee shall be bound to fulfill all the obligations of the contract and shall be liable for nonperformance thereof in the same manner and to the same extent as the contracting parties; it being understood that no transfer shall release the contracting parties from their obligations or liabilities under the contract. ’ ’
And tbe excerpt from tbe opinion above referred to is as follows:
“It is not and could not be contended that clause 4 of the lease, prohibited Muñoz from creating a lien'upon his crops; Molina'there-: fore bought in November,: 1927, an admittedly valid lien. The claim is and must be that Lebrón by his eviction suit destroyed that lien. This can not be so; section 8 supra, applies. The result of that suit was simply to transfer' to Lebrón by ‘operation of law’ the leased property and (as he claims) ‘ the cane which'is the object of the contract’, afid thus left.him-subject to the provisions" that ‘the transferee-shall be bound to fulfill all the obligations of the contract’ resting: upon Muñoz. To hold otherwise, as the court below held, would be to *75nullify the plain purpose of the act; so construed, the act would be nearly if not quite worthless.” Molina v. Muñoz, 31 F. (2d) 727, 729.
The controversy may be simplified by supplying an answer to this question: Who in the case at bar is the owner of the cane crop which was growing on the properties leased by Santos at the time of the rescission of the contract of lease and which, after harvesting, produced the sum now deposited in the district court? Is it Santos, or the plaintiff landlord?
The plaintiff and appellant seems to assume, without even discussing it in its brief, that inasmuch as Santos did not claim the crop, the latter belonged to it; and we think this is not so. The crop was planted by Santos, the lessee. He was the owner thereof and he could mortgage it, as he did, to his crop creditor, the intervener in the present case; a lien of which the plaintiff was bound to have notice by virtue of its record in the registry.
It does not matter that in the contract of lease it was provided that all improvements made by the lessee on the leased properties would be for the benefit of the lessor at the termination of the lease. In the case of Santiago v. Berlinger, 38 P.R.R. 516, 518, 520, this court said:
“It is contended in the second assignment that the court erred in not holding that clause’ 5 of the lease contract transcribed in the new matter of the answer barred any claim by the plaintiff.
“The clause is clear. It was agreed that the improvements made on the leased property should remain for the benefit of the lessor at the termination of the contract, that is, for the benefit of the defendant in this action.
“The question is whether the growing crop of sugar cane has or has not the character of an improvement to the leased property. If not, then it is evident, according to the law and the jurisprudence, that it is a product belonging to the lessee which he has the right to gather, or to be paid its value, at the termination of the lease. Sections 1480 and 1481 of the Civil Code; section 18 of the Unlawful Detainer Act, Com. 1911, sec. 1642; Nevares v. District Court, 36 P.R.R. 323.
*76;“Any planting whatever which increases the value of a property-may be considered an improvement within the general meaning of that word, but not within its juridical meaning. The planting of trees and vines involves the idea of permanency and of long duration, which is not to be found in the planting of crops gathered monthly or yearly. A' cane plantation may last many years on extraordinarily rich ground, but this is not usually the case. It would be different in the case of permanent improvements made by reason of the planting of the cane; but in the present case we are dealing only with the fruits of the plantation.”
That the plaintiff itself did not rely exclusively on its contract in order to appropriate the cane existing on its properties at the time of the rescission, is shown by the fact that in suing for rescission and the payment of its credit, it moved for an attachment of the said cane to secure the effectiveness of any judgment that might be rendered in the action, and it was then that there arose the claim of priority on the part of the intervener based on its contract for advances and the provisions of the Civil Code regarding the preference of credits.
The Agricultural Loan Act itself in providing for the case of a sale at public auction of a property the fruits of which secure a crop credit, makes reference to other provisions of the Civil Code which throw light upon the real intention of the Legislature, and lays down the rule to be followed for a just and lawful determination of conflicts of rights arising in cases like the present one.
The provisions of the code to which reference has been made are set forth in section 290, which forms a part of the chapter relating to the right of accession and of the section specifically dealing with the right of accession with respect to what is produced by the property. Said provisions read as follows:
“The receiver of fruits is obliged to pay the expenses incurred by a third person in their production, gathering and preservation.”
*77And the rule above referred to is stated thus:
“Pursuant to the provisions of section 363 of the Civil Code, the purchaser of property at public auction, the crops on which property are encumbered by a crop lien entered .in the Registry of Property or in the special registry provided by this Act, whether such auction is the outcome of an ordinary action or of an action to recover a mortgage credit registered subsequently to the crop loan or prior thereto, but constituted after this Act takes effect, shall choose between allowing the crop creditor, or the first crop creditor where there are several, to harvest and receive such pending crops as are subject to the lien and fully to cultivate and prepare for the harvest, and paying said» crop creditor the assessed value of the crop at the time such purchaser takes possession of them, to the amount of the crop lien, though not exceeding the sum stated in the register. In the latter case an assessment shall be made as in the ease of an execution of a judgment of unlawful detainer against a defendant claiming improvements, labor and crops.” Third paragraph, section 4 of the Agricultural Loan Act of 1910, as amended on August 1, 1925.
By virtue of all- the foregoing the judgment appealed from must be affirmed.
Mr. Justice Córdova Dávila took no part in the decision of this case.