delivered the opinion of the court.
This was a suit brought by the Landlords ’ League of San Juan, through A. Sarmiento, esq., its attorney, against the City of San Juan, seeking a judgment or decree of the district court declaring null and void some of the provisions of the ordinance passed and approved by the City of San Juan on the 10th day of November, 1906, regulating the service óf collecting garbage and waste matter, and the manner in which they should be exposed by the inhabitants of the city, in so far as article 5 of said ordinance orders that the cans in which the inhabitants of the houses of San Juan should deposit their garbage should be supplied by the proprietors of the real estate, and in so far as article 6 concedes to the said owners of the houses a term in order to provide the said cans, to which the former article refers.
The complaint in this case was filed on the 8th day of February, 1907. On the 18th of the same month Ramón Falcon, acting as attorney for the said city, filed a demurrer to the said complaint, founded on paragraph 6 of article 105 of the Code of Civil Procedure, because the said complaint does not set forth facts sufficient to constitute a cause of action. The attorney for the plaintiff made a motion to dismiss the exception, because it was not founded in accordance with the Code of Civil Procedure, which motion, was denied by the court, and the plaintiff took an exception to the said ruling. The court took the demurrer under consideration on the 9th *87of August, 1907, and made the following ruling in regard thereto:
“The Landlords’ League of city property of the city of San Juan has filed in this court a suit against the municipality of San Juan, seeking the annulment of two points set out in an ordinance passed by the City Council on the 10th of November, 1906, to regulate the service of collecting garbage and waste matter, and the manner in which the same should be exposed by the residents of the city, in which it is "provided that the galvanized iron cans in which the tenants of houses should deposit the garbage should be furnished by the owners of the real estate, and grant them a term within which to provide their houses with the aforsaid receptacles; alleging further that these two last-named provisions are contrary to law and abridge the right of the plaintiff league.
‘ “This complaint was excepted to by the Alcalde of the municipality of San Juan, alleging that it does not set forth facts sufficient to constitute an action, paragraph 6 of article 105 of the Code of Civil Procedure, and which exception was argued in open court by counsel for the parties.
“As will be seen from the complaint, a municipal ordinance is involved, which regulates the service for the collection of - garbage and waste matter, and the manner in which the same shall be exposed; so that object of such ordinance being to regulate a matter which affects the public health and sanitation, the municipality of San Juan was within its powers in passing the same, as it is authorized to do by section 25, paragraph 12 of the law of the 8th of March, 1906, which provides for the establishment of a system of local government and other matters, which right is acknowledged by the complainant in asking for the annulment of such ordinance, only with respect to the matters which require that the receptacle of galvanized iron be supplied by the owners of the properties, and with respect to the term fixed within with such provisions shall be' complied with.
“It being admitted then by the plaintiff that the city may make regulations affecting sanitation and the public health, it must admit also that it may choose, without violating the law, the means by which its ordinances shall be complied with. And, indeed, we do not see that any law is violated by imposing upon owners of city real estate the obligation of furnishing the receptacles of galvanized iron, in which the tenants shall place the garbage, and in such respect we are of ' opinion that the ordinance attacked was properly passed by the municipality of San Juan, acting within its powers.
*88" Therefore we are unable to see how the complainant in this case can bring about the annulment of two of its provisions, and consequently that the facts of the same do not constitute a cause of action, or in other words a right to the' remedy sought.
“For these reasons thé exception taken by the defendant is sustained by the court,, and the complaint dismissed with costs. "
On the 19th. of August the plaintiff took an appeal from the judgment of the district court to this Supreme Court. He presented, together with the judgment roll, what is called a bill of exceptions and a statement of the case, all of the record being filed in this court on the 8th of September last. A written brief was also filed by the attorney for the plaintiff and appellant. On the 3d day of December the case was submitted to this court on the record and on oral arguments, and duly taken under consideration.
Let us first consider the ruling of the trial court made on the demurrer in the decision quoted at large above. We are clearly of the opinion that the ruling made by the court below sustaining the demurrer to the complaint was correct and founded on sound legal principles and precedents. The objection presented by the plaintiff that the demurrer is not sufficiently explicit cannot be sustained by the authorities which we have consulted. As our Code of Civil Procedure is derived, at least indirectly through that of Idaho, from the similar statutes in the State of California, we follow on ques-' tions of that nature, the decisions of the Supreme Court of that State.
A demurrer on the grounds “that the court has no jurisdiction, either of the persons of the defendants, or of the subject of the action” and “that the complaint does not state facts sufficient to constitute a cause of action,” is sufficiently explicit under the rules of construction adopted by the courts of California. (Ellissen v. Halleck, 6 Cal., 387.)
The objection that the demurrer does not “distinctly specify the grounds on which the objections of. the complaint are *89taken” would perhaps have been maintained were it not for the fact that the courts of California, following the analogies' of the New York Code, have adopted the construction of her courts upon that subject, and maintained the sufficiency of such a demurrer.
That eminent court goes on to say:
“In mere matters of practice involving no principle, it would be safer to acquiesce in a rule which has been established for several years in the inferior courts of this State, the abrogation of which might introduce confusion and operate hardly on litigants.” (Ellissen v. Halleck, 6 Cal., 394.)
Section 106 of the Code of Civil Prorecdure of Porto Eico is identical with section 431 of the Code of Civil Procedure of California. See note on said section on page 215 of Pome-roy’s Code of Civil Procedure, and the authorities there cited, which we are constrained to follow in the case at bar. The ordinary distinctions formerly in vogue between general and special demurrers are done away with by the California Code. Under that Code all the statutory grounds of demurrer are classed alike as grounds of general demurrer.
The grounds of demurrer, however, must be specifically stated; for example, where the ground is ambiguity, the 7th mentioned in section 105 of our Code, and the pleader must point out in what the ambiguity consists. (Lorenza v. Camarillo, 45 Cal., 559.) But there is an exception made to this requirement in regard to those demurrable faults which are not waived by omitting to point out by demurrer. Such we take it are, among others, that the complaint does not state facts sufficient to constitute a cause of action. This has been held in several California cases to be sufficiently explicit. (Ellissen v. Halleck, 6 Cal., 380; Green v. Palmer, 15 Cal., 414; Joseph v. Holt, 37 Cal., 250.)
In view of the statutes of Porto Eico and the corresponding statutes of California, and the decisions rendered thereunder, we must hold that the demurrer in this case was prop*90erly sustained, and that the judgment of the district court was in that particular correct.
There is no objection made to the personality of the plaintiff. And whatever doubts may arise in regard to the question whether or not this suit could be maintained if the legal existence or the proper appearance of the plaintiff should be called in question are passed over and disregarded as not involved in this question. But we find deeper questions involved in this case. This action is brought to annul an ordinance passed by the City Council of San Juan. No court has jurisdiction of such a case as this. The function of courts is to try cases between individuals, or between corporations, municipal or other, and individuals, or between corporations themselves — that is to say, between parties claiming some right on the one part and denying it on the other — which controversy involves one or more concrete questions, which are submitted to the decision of the tribunal selected. There must always be a controversy between the parties in which one claims a right which is denied by the other. In the examination and determination of such a controversy the validity of a city ordinance may arise; and if the question is properly raised it must be determined. Or the validity or constitutionality of an act of the legislature, State or Federal, may be presented in the same manner by one or the other of the parties claiming some right under such statute. In such cases the court trying the case, in determining what is the law applicable to the case under consideration, is called on to say whether the statute or the ordinance relied on is’ valid or not. If it is contrary to the constitution of the United States, or the State constitution of the State whose legislature has enacted the law, of course both cannot be valid and the lesser must yield. The constitution is the paramount law, and if the statute or ordinance contradicts or violates the constitution it is not a law, and the court will so decide. Or, in this Island, if an act of the local legislature contravenes *91the organic act it is null and void; or if an ordinance of a city is not authorized by the statutory laws of the Island it has no force and effect; but this question cannot arise except in actual suits or actions pending between parties. To this effect are the decisions of the American courts; and we quote from an opinion of the Supreme Court of the United States delivered by Mr. Justice Brewer, which is in point and in which he says:
“The theory upon which, apparently, this suit was brought is that parties have an appeal from the legislature to the courts; and that the latter are given an immediate and general supervision of the constitutionality of the acts of the former. Such is not true. Whenever in pursuance of an honest and actual antagonistic assertion of rights by one individual against another, there is presented a question involving the validity of any act of any legislature, State or Federal, and the decision necessarily rests on the competency of the legislature to so enact, the court must, in the exercise of its solemn duties, determine whether the act be constitutional or not; but such an exercise of power is the ultimate and supreme function of courts. It is legitimate only in the last resort, and as a necessity in the determination of a real, earnest and vital controversy between individuals. It never was thought that by means of a friendly suit, a party beaten in the legislature could transfer to the courts an inquiry as to the constitutionality of the legislative act.” (Chicago, etc., Railway Co. v. Wellman, 143 U. S., 344.)
The question of 'jurisdiction is one which must always be considered and given priority by every court, and it can be raised by the court of its own motion whether presented by the parties or not. No court should proceed with the investigation of any case until all doubts in regard to its jurisdiction are settled favorably thereto. And when the attention of the' court is called to a defect in the jurisdiction it is bound to rectify it, whatever may be the laches of the parties.
Jurisdiction is the power to hear and determine a cause, the authority by which judicial officers take cognizance of and decide causes.
*92(United States v. Arredondo, 31 U. S., 691; Brownsville v. Basse, 43 Tex., 440; Goodman v. Winter, 38 Am. Rep., 13; Bennett Ex parte, 44 Cal., 84; Territory v. Flowers, 2 Mont., 531; House v. Williams, 40 Tex., 346; Withers v. Patterson, 27 Tex., 491.)
The courts are open to every one for “an injury clone Mm in Ms lands, goods, person or reputation.” Courts need not and cannot determine fictitious controversies. .Consent of the parties to a suit cannot give a court jurisdiction over the subject matter when it is not authorized by law. It is the legislature alone which fixes by statute the jurisdiction of the. courts.
(Ballance v. Forsyth, 62 U. S., 389; Shirrer v. People, 93 Ill., 472; Sanders v. Farwell, 1 Mont., 599; Wynns v. Underwood, 1 Tex., 48; Riggs v. Bell, 3 So. Rep., 183.)
The district court could not consider the abstract question of the legality or constitutionality of the city ordinance on a case brought to annul the ordinance. Many courts have made decisions to this effect, some of which are quoted as follows:
“Tbe power of a court to pass upon the constitutionality of an act of the legislature should not be invoked by means of an amicable suit, especially where there is an agreed statement of facts. This power is the supreme judicial function, and its exercise is only legitimate in the last resort, in the determination of an earnest and vital controversy.” (Chicago & C. T. Ry. Co. v. Wellman, 143 U. S., 339; Foster v. Commissioners, 9 Ohio Stat., 540; Wellington v. Petitioners, 33 Mass., 96.)
“The constitutionality of a statute cannot legally be passed upon by a court in an action in which it is not the foundation of some right asserted, or of some defense made, nor should it be passed upon unless its determination is unavoidably involved in the decision of the case. ’ ’ (M. & B. R. R. Co. v. Whitehead, 109 Ala., 495; 19 South Reporter, 705.)
“A fictitious action of trespass, instituted in.order to test the constitutionality of an act of the legislature, dividing a county, will be dismissed upon the court becoming aware of the nature of the suit." (Brewington v. Lowe, 1 Ind.; 1 Cart. 21.)
*93“The court will not decide a constitutional question unless it be-necessary to the determination of the case, or where the record raises, other questions which are decisive, nor can the parties, by waiving the-other questions and forming an agreed case obtain a decision on the constitutional question.” (Dubuque & D. Ry. Co. v. Diehl, 64 Iowa, 634; 21 N. W., 117.)
" Questions as to the constitutionality of an act will not be considered unless they are essential to the determination of the cause.” (People v. County of New York Sup’rs, 41 N. Y.; 2 Keyes, 288; 3 Abb. Dec., 566; 34 How. Prac., 379.)
“Unless some individual right directly affecting the parties litigant is brought in question by a suit, so that a judicial decision becomes necessary to settle the matters in controversy between them relative thereto the courts have no jurisdiction. A fictitious suit to settle some-abstract question of law will not be entertained.” (Brewington v. Lowe, 1 Ind., 48; Am. Dec., 349.)
It has been held in California that, to secure the decision of a court on a question involving the constitutionality of a statute, the controversy must be a real one arising between the parties and presented in good faith, in the due course of litigation, and not merely to gratify the curiosity of counsel or of a party who procured it to be raised against himself by others having no real interest in the contest. (People v. Pratt, 30 Cal., 224.)
There was a case decided by the Supreme Court of West. Virginia in the year 1887 which is very nearly parallel to the one at bar. Under an act of the legislature of that State permitting them to do so 12 residents and taxpayers of the-city of Wheeling brought a suit against the city to declare an ordinance null and void as contrary to the law, and asking that it be superseded, revoked and annulled. In an able and lengthy opinion rendered by Mr. Justice Snyder the question is discussed in the following language:
“It is an elementary principle of universal application that the laws and ordinances of a city adopted by its council, within the scope of its authority, partake of the nature; and have the same effect within the corporate limits of the city that the same laws could have-if they had been enacted by the legislature of the State in which *94the city is located. Ixl the one case the legislature exercises its legislative powers directly, while in the other it does so indirectly, by delegating to the city a portion of its functions; but whether the power is exercised directly by the legislature itself, or indirectly by the counsel of the city under a legislative grant, the result is the same, and in both instances the power exercised is legislative. The enactment of an ordinance by a city council, or the enactment of a statute by the legislature, being in each case the exercise of legislative power, the repeal of an ordinance or statute must likewise be the exercise of legislative power. It does not require any precise definition of judicial power, or any nice discrimination as to its extent and limitations to determine that the act of repealing a statute is not the exercise of judicial power.
“Without attempting to fix a line of distinction between legislative and judicial powers which will be accurate in all cases, there are certain acts and duties appertaining to each about which there can be no doubt or controversy. As is well said in Ratcliff v. Anderson, it is the province of courts to decide what the law is or has been, and, to determine its application to particular facts in the decisions of causes; the province of the legislature is to declare what the law shall be in the future; and neither of these departments can lawfully invade the province of the other.” (31 Grat., 107.)
‘ ‘ Courts determine what the rights of parties are in suits or controversies interparties which come before them in the ordinary and proper course of judicial proceedings.' In determining the rights of the parties to the suit, they incidentally determine the 'law; but the judicial function is as effectually performed by the court which expresses no formal opinion as by the court which in an opinion announces the reasons for its decision.
“The general and abstract question whether an act of the legislature be constitutional cannot, with propiety, be presented to a court; the question must be whether the act furnishes the rule to govern the particular case.” (Foster v. Commissioners, etc., 9 Ohio Stat., 540, 543. See Shepherd et al. or City of Wheeling, 4 Southwestern Reporter, p. 636-637.)
To the same effect we find the language of the learned Chief Justice Cooley in his great work on Constitutional Limitations. On this point he says:
“The statute is assumed to be valid, until some one complains whose rights it invades. Prima facie, and upon the face of the act *95itself, nothing will generally appear to show that .the act is not valid; and it is only when some person attempts to resist its operation, and calls in the aid of the judicial power to pronounce it void, as to him, his property or Ms rights, that the objection of nnconstitutionality can be presented and sustained. Respect for the legislature, therefore, concurs with well-established principles of law in the conclusion that such an act is not void, but voidable only; and it follows, as a necessary legal inference from this position, that this ground of avoidance can be taken advantage of by those only who have right to question the validity of the act, and not by strangers. To this extent only it is necessary to go, in order to secure and protect the rights of all persons against the unwarranted exercise of legislative power, and to this extent only, therefore, are courts of justice called on to interpose.” (Cooley on Constitutional Limitations, p. 197.)
In accordance with the authorities which we have cited, it is plain to our minds that the district court had no jurisdiction of this case, inasmuch as a suit cannot he maintained with the direct purpose of setting aside a statute without showing any bona fide case, independent of that abstract question, pending between the parties. For this reason the judgment of the district court should be affirmed and the suit of the plaintiff dismissed for want of jurisdiction.
Affirmed.
Chief Justice Quiñones and Justices Hernandez, Figueras and Wolf concurred.