delivered the opinion of the court.
The appellant, Juan Z. Rodriguez, brought an action in the District Court of San Juan against The People of Porto Rico for the recovery of 70,000 pesos, alleging in his complaint that in the year 1872 he had been appointed by the Governor General of Porto Rico a provisional notary of the town of Sabana Grande. On January 24, 1874, the Central Governemnt of the Republic of Spain confirmed the appointment and directed the issue in his favor of a certificate as a notary public of Sabana Grande. In April, 1880, he was appointed a notary of Yauco and continued in said office until 1894, when, by reason of exchange he was appointed a notary of Mayagiiez, which office he held until the year 1899, when he was appointed a notary of Arecibo..
In order to enter as notary in the town of Sabana Grande, he had been compelled to pay to the owner of said office alienated by the Crown of Spain, the sum of 7,000 pesos, and in addition, to the Public Treasury 3,000 pesetas, one-half the *539officially estimated value of tlie office, 150 pesetas as tlie media anata tax, and 27 for tlie 18 per cent of the transportation to the Peninsula. In order to exchange with the notary at Mayagüez, he was further obliged to give him, in addition to the notarial office in Yanco, the sum of 5,000 pesos. -The notarial office in Mayagüez was appraised by the Audiencia of Porto Rico at the sum of 12,000 pesos.
In accordance with the law that guaranteed it, he exercised the notarial profession alone in Sabana Grande, in Yauco, in Mayagüez with Mariano Riera Palmer, and finally, in Arecibo, until the Legislative Assembly of Porto Rico, on January 31, 1901, decreed that “all lawyers, citizens of Porto Rico, in the exercise of their profession before the insular courts, may act as notaries without any limited territorial demarcation,” by which the former notaries, who had secured their offices for a valuable consideration, were deprived of the right to enjoy their notarial offices within their district to the exclusion of any other notdr'y.
The plaintiff further alleges that when this reform was adopted that no indemnity whatsoever was granted to the notaries who had acquired their notarial office for a valuable consideration, and that said notaries having made a petition to the Legislative Assembly of Porto Rico for indemnity for the damages they had suffered, in declaring the exercise of the notarial profession in Porto Rico to be free, in violation of the Treaty of Paris, inasmuch as their rights of ownership had been guaranteed by said treaty, had not been respected, the Assembly enacted a law on March 9,1905, creating a commission to investigate such claims, etc. This act not having been executed, the notaries again addressed the Assembly, and in the year 1907 the House of Delegates passed a joint resolu-lion appropriating the sum of $69,000 to indemnify the claimants for the losses suffered by them; and when said resolution was sent to the Executive Council, the latter resolved that the claim of the notaries was not worthy of the favorable *540Consideration of the Legislature and that, if they had any legal right, their claims should be enforced through the courts.
And the plaintiff finally alleges in his complaint that the real value of the notarial office in Mayagüez was $25,000, and that the income lost by the plaintiff from January 31,1901, to the date of the complaint, amounts to $45,000.
The defendant appeared and alleged in the demurrer: (a) That the court did not have jurisdiction because The People of Porto Rico could not be sued without its consent, and (&) Because the facts stated were insufficient to constitute a cause of action, “inasmuch as the office of notary is not property and, consequently, is not guaranteed by the provisions of article 8 of the Treaty of Peace between Spain and the United States, because the right to 'engage in the notarial profession is dependent on a political law which terminated and the powers created by that law terminated with the change of sovereignty.”
And the District Court of San Juan rendered the judgment from which this appeal is taken.
“On March 19, 1910, in open court, this cause was called for hearing on the demurrer to the complaint, and both parties appeared through their attorneys, who read their allegations and made oral arguments in favor thereof. The same day the court made an order on motion of the plaintiff, granting him six days in which to amend the complaint with respect to the allegations relating to the jurisdiction of this court, under the penalty of entering judgment against the plaintiff if he should fail to do so.
“And the period allowed for the purpose having expired without ■the plaintiff having filed any amendment, the demurrer of the defendant, on the ground that the court lacked jurisdiction in this case, was sustained, and, consequently, said complaint is dismissed with the costs against the plaintiff. The secretary will strike out the assignment from the calendar and issue the proper writ of execution. Pronounced in open court March 31, 1910, and entered on that date. ’ ’
In the case of Rosaly v. The People of Porto Rico et al., decided June 14, 1910, this Supreme Court held that The *541People of Porto Eico could loe sued without its previous consent, and this being the case we should, on this ground alone, reverse the judgment appealed from, inasmuch as our decision destroys the only reason the trial judge apparently had to render it.
But, as a matter of fact, that was not the only question raised in the district court and argued in the Supreme Court, and, furthermore, it has been held, “that an appellate court is not confined to the grounds adduced by the lower court in support of its decision, but may affirm a judgment on other grounds different from those of the lower court.” (3 Cyc., 221.)
In the case of Rosaly v. Graham (16 P. R. Rep., 156), decided March 11,1910, this court said: “If this Supreme Court arrives at the conclusion that a judgment is just and proper, it is not necessary to refer to the grounds which the trial judge may have set forth in his opinion; because even though such grounds were well taken, the judgment would be properly affirmed if the judgment was, as it is in this case, supported by the allegations and the evidence, and by the facts and the law. ’ ’
The respondent alleged in the district court, as we have stated above, that the complaint does not state facts sufficient to constitute a cause of action, “inasmuch as the office of notary is not property and, consequently, is not guaranteed by the provisions of article 8 of the Treaty of Peace between Spain and the United States; because the right to engage in the notarial profession is dependent on a political law which terminated, and the powers created by that law terminated with the change of sovereignty.”
The allegation of the defendant and respondent is clearly sustained by the authorities cited by him and especially, by the jurisprudence established by the Supreme Court of the United States in the case of Sánchez v. The United States, decided February 21, 1910. In that case Mr. Justice Harlan, *542in delivering the opinion of the court, expressed himself in the following terms:
“The claimant proceeds in his petition on the ground that the effect of the eighth section of the Act of Congress of April 12, 1900, was to confiscate, finally and effectually, without compensation to him, the office which he claims to have lawfully purchased in perpetuity, prior to the occupation of Porto Rico by the military forces of the United States, and the cession of that Island to this country; which confiscation, he insists, could not have been legally done without violating the treaty between the United States and Spain which was set in force when the act of 1900 was passed.
“We do not think that the present claim is covered by the treaty. It is true that a treaty negotiated by the United States is a part of the supreme law of the land, and that it is expressly provided in the treaty in question that it ‘cannot in any respect impair the property or rights which by law belong to the peaceful possession of property of all kinds * * * of private individuals.’ But, clearly, those provisions have no reference to public or quasi-public stations, the functions and duties of which it is in the province of the Government to regulate or control for the welfare of the people, even where the incumbents of such stations are permitted, while in the discharge of their duties, to earn and receive emoluments or fees for services rendered by them. The words in the treaty ‘property * * * of private individuals,’ evidently refer to ordinary, private property, of present, ascertainable value and capable of being transferred between man and man.
“When the United States, in the progress of the war with Spain, took firm, military possession of Porto Rico, and the sovereignty of Spain over that Island and its inhabitants and their property was displaced, the United States, the new sovereign, found that some persons claimed to have purchased, to hold in perpetuity, and to be entitled, without regard to the public will, to discharge the duties of certain offices or positions which were not strictly private positions in which the public had no interest. They were offices of a quasi-public nature, in that the incumbents were officers of court, and in a material sense connected with the administration of justice in tribunals created by the Government for the benefit of the public. It is inconceivable that the United States, when it agreed in the treaty not to impair the property or rights of private individuals, intended to recognize, or to feel itself bound to recognize, the stability of such positions in perpet*543uity, or so to restrict its sovereign authority that it could not, consistently with the treaty, abolish a system that was entirely foreign to the conception of the American people, and inconsistent with the spirit of our institutions. It is true that Congress did not, we assume, intend by the Foraker Act to modify the treaty, but if that act were deemed inconsistent with the treaty the act would prevail; for, an act of Congress passed after a treaty takes effect, must be respected and enforced, despite any previous or existing treaty provision on the same subject. (Ribas é Hijo v. United States, 194 U. S., 315, 324, and authorities cited.) If, originally, the claimant lawfully purchased, in perpetuity, the office of solicitor (procurador), and held it when Porto Rico was acquired by the United States, he acquired it and held it subject, necessarily to the power of the United States to abolish it whenever it conceived that the public interest demanded that it be done. The intention of Congress in relation to the office of solicitor or procurador by the Foraker Act cannot be doubted — indeed, its abolition by Congress is made the ground of the present action and claim. Upon the acquisition of Porto Rico, that Island was placed under military government, subject until Congress acted in the premises, to the authority of the President as Commander-in-Ghief acting under the Constitution and laws of the United States. Porto Rico was made a department by order of the President on October 18, 1898. By his sanction, it must be presumed, General Order No. 134 was made, abolishing the office of solicitor and procurador. That order was recognized by Congress, if such recognition was essential to its validity, when Congress, by the Foraker Act of 1900, provided that the laws and ordinances of Porto Rico then in force, should continue in full force and effect, except ‘as altered or modified by military orders in force’ when that act was passed. It is clear that claimant is not entitled to be compensated for his office by the United States because of its exercise of an authority unquestionably possessed by it as the lawful sovereign of the Island and its inhabitants. The abolition of the office was not, we think, in violation of the Constitution, nor did it infringe any right of property which the claimant could assert against the United States. (See O’Reilly de Camara v. Brooke, 209 U. S., 45, 49.) ”
Tlie foregoing doctrine is applicable to this case especially when the Legislative Assembly of Porto Eico, in .enacting the law relative to notarial practice in Porto Eico, approved January 31, 1901, did not deprive the former notaries of the right to exercise their profession nor to retain *544their protocols as long as they should continue to practice as notaries; but it merely abolished an exclusive monoply, and declared the notarial practice open to all lawyers in the practice of their profession before the insular courts, subject to the Notarial Law and after complying with certain requisites.
We refer, finally, to the judgment of this court rendered in the case of Palmer v. The People of Porto Rico, on March 30, 1904, and invoked by the defendant and respondent in his brief. Said decision does not have the scope which the respondent gives it in so far as it holds that The People of Porto Rico could not be sued without its consent, but it bears a close relation to the case under discussion.
The question raised in this case by the plaintiff was raised by the former notaries, including the plaintiff himself, in an action which they brought in the District Court of San Juan for the recovery of $610,488. After having heard the Attorney General, the court, by ruling of April 7, 1903, held that it did not have jurisdiction, by reason of the subject, to take cognizance of the action and did not take cognizance thereof. An appeal having been taken from this order by the former notaries, it was affirmed by this Supreme Court by the decision of March 30,1904, to which we have referred.
Therefore, the -appeal should be dismissed and the judgment appealed from affirmed.
Affirmed.
Chief Justice Hernández and Justice Wolf concurred. Mr. Justice MacLeary signed the judgment and stated that he concurred therein, but not in all parts of the opinion. Mr. Justice Figueras did not take part in the decision of this case.