delivered the opinion of the Court.
On December 11, 1945 the plaintiff filed a taxpayer’s suit against the members of the Executive Council and the Board of Directors of the Puerto Pico Agricultural Company, alleging that the Company was created by Act No. 31, Laws of Puerto Rico, 1945, (p. 74); that § 27 of Act No. 31 appro*168priates $10,100,000 of public funds of Puerto Rico to be used by the Company; that this appropriation is illegal because Act No. 31 violates various provisions of the Organic Act; that the Company has $5,000,000 in its possession which it proposes to expend under the authority of Act No. 31; and that to permit the defendants to expend these public funds pursuant to this unconstitutional statute will cause irreparable injury to the plaintiff and all other taxpayers of Puerto Rico. The plaintiff prayed for an injunction against the defendants to prevent them from expending the funds in their possession pursuant to Act No. 31.
On January 17, 1946, after a hearing on a motion for a preliminary injunction the district court entered a restraining order prohibiting expenditure by the defendants of the funds in question. On January 28 the plaintiff moved for the appointment of a receiver. On February 1 the court, reciting (a) that the parties were in agreement that a receiver should be appointed without prejudice to the right of the defendants to raise any question as to the legality of these proceedings and (b) that the parties had submitted among others the name of Thomas A. Fennell, the General Manager of the Company, appointed Fennell as receiver to serve while the restraining order was in effect.
On February 18 the court granted the motion for a preliminary injunction, and named Federico López del Valle as receiver to serve until the case was finally decided. The new receiver never took office because he never posted a bond as required by the order of the court. On the same day the defendants moved for a trial on the merits. On February 19 the district court set the ease for trial on February 26, at 9 a.m.
On February 25 the district court, without notifying or hearing the parties, entered a judgment setting aside the preliminary injunction and the appointment of López del Valle as receiver and dismissing the case on the ground that the Legislature had on February 25 approved Acts Nos. 1 and 2, *169Laws of Puerto Eico, 1946 (pps. 2 and 6), which deprived the court of any further jurisdiction in the case except to enter a judgment of dismissal and to set aside the orders hitherto entered. The plaintiff appealed from this judgment of the district court.
Act No. 2 specifically provides in § 2 that ‘‘The action known in equity as taxpayer’s suit is hereby prohibited.” And § 3 extends this prohibition to pending actions. But the plaintiff contends that Act No. 2 is invalid and in any event could not be applied to the instant case which was pending when it was enacted.
In Buscaglia, Treas. v. District Court, 64 P.R.R. 11, this Court held, the writer dissenting, that a taxpayer may sue to restrain public officials from illegally expending public funds. If that question had been Federal or constitutional, this Court would have been compelled to follow Massachusetts v. Mellon, 262 U. S. 447, which holds that a Federal taxpayer has no standing to institute such a suit against Federal officials. But we held at p. 21 that the question was local and that we were free to lay down our own local rule contrary to that established in Massachusetts v. Mellon. In affirming our judgment, the Circuit Court said that “we have no doubt that it is within the competence of the territorial government, either by legislative act or judicial decision to authorize a taxpayer’s bill in equity . . Buscaglia v. District Court, 145 F.(2d) 274, 284 (CCA 1st, 1944), cert. denied, 65 S. Ct. 434. (Italics ours.°) And if the remedy of a taxpayer’s suit may be created by legislative act, by the same token it may be abolished by legislative act.
This is not a common law jurisdiction. For a remedy to exist in Puerto Eico it must be provided by statute. People v. Escambrón, 63 P.R.R. 731. The majority opinion in the Buscaglia case held in effect that a specific legislative provision authorizing a taxpayer’s suit was not necessary, and that in the absence of restrictive legislation against such a suit, our general statute establishing the remedy of in june*170tion enabled a taxpayer to obtain an injunction against public officials illegally expending public funds. See Crampton v. Zabriskie, 101 U. S. 601, 609. But the Legislature bas in Act No. 2 taken action on a local question; in that Act it in effect amended our general injunction statute and abolished taxpayers’ suits in Puerto Rico. Section 1 recites that the rule of Massachusetts v. Mellon is to be followed by the insular courts. And § 3 provides that no insular court “shall have jurisdiction” over a taxpayer’s suit.
We are unable to follow the plaintiff in his argument that Act No. 2 is invalid. The cases are unanimous in holding that where, as in this jurisdiction, 48 USCA ^ 861, the Legislature has been vested with the power to determine the jurisdiction of the courts, it may legislate with reference to remedies by limiting or withdrawing the jurisdiction of the courts to issue injunctions in a particular type of controversy, such as labor disputes or as here taxpayers’ suits. And such restrictive legislation is valid even as applied to pending cases because injunction is a remedy in which there is no vested right. Smallwood v. Gallardo, 275 U.S. 56, 61-62; Gallardo v. Santini Co., 275 U.S. 62; Fajardo Sugar Co. of P. R. v. Domenech, Treas., 45 P.R.R. 539; Trainmen v. Toledo, P. & W. R. Co., 321 U. S. 50, 63-64; Lockerty v. Phillips, 319 U. S. 182; Yakus v. U. S., 321 U. S. 414, 440-443, particularly footnote 8; Ponce v. Roman Catholic Church, 210 U. S. 296; People v. Fajardo Sugar Co., 50 P.R.R. 156, 172; Drivers’ Union v. Lake Valley, 311 U. S. 91, 101; New Negro Alliance v. Grocery Co., 303 U. S. 552; Levering & Garrigues Co. v. Morrin, 71 F.(2d) 284, 287 (CCA 2nd, 1934); Cinderella Theatre Co. v. Sign Writers’ Local Union, 6 F. Supp. 164, 169 (Dist. Ct., Mich., 1934); Dehan v. Hotel and Restaurant Employees, 159 So. 637, 647 (La. 1935); Ex parte McCardle, 7 Wall. 506.1
*171Indeed, although early in his brief the plaintiff argues that Act No. 2 is invalid, he subsequently concedes that he had no vested right in the remedy of injunction of which he could not be deprived by the Legislature. He argues, however, that “when the plaintiff filed his complaint he had a good cause of action against the defendants of which he could not be deprived by leaving him without any judicial remedy to enforce the same.” In support of this statement, the plaintiff cites Honeyman v. Jacobs et al., 306 U. S. 539; United States v. Standard Oil Co. of California et al., 21 F. Supp. 645 (Dist. Ct., Calif., 1937); Ritholz et al. v. March et al., 105 F.(2d) 937 (C.C.A., D.C., 1939). We find nothing-in these cases to support the plaintiff here. But assuming they did apply, the so-called right of the plaintiff here was not a private right for which he can look to the Constitution and the Organic Act for protection. We held in the Buscaglia case at p. 21 that a taxpayer’s suit was of a public, not a private, nature. The taxpayer there and here sued to vindicate the public interest. See IV Dillon, Municipal Corporations (5th ed.) pp. 2784^5. As a matter of fact, the plaintiff himself alleges in his complaint that it is being filed in his own name as a taxpayer and in the name of and in representa-' tion of all other taxpayers of Puerto Pico. Under those circumstances, even if we assume, without deciding, that when Act No. 2 was enacted there was a vested right in the pending case, it was a right which belonged to the public, not to any particular individual. Consequently, when the Legislature by Act No. 2 withdrew from the courts jurisdiction to pass, on such public rights even in pending cases, it did not impair the specific and individual private rights of the plaintiff which the Constitution and the Organic Act protect.
*172The plaintiff also argues that the Legislature cannot by legislative fiat deprive him of a judicial decision in his favor; namely, the orders of the lower court granting a preliminary injunction and appointing a receiver. But we have found no case holding that a litigant cannot be deprived of a judicial “decision” in his favor which is merely provisional and purports only to preserve the status quo until the case can be finally decided. The theory of the plaintiff, so far as we are aware, is applicable only to final judgments. And here there was no final judgment in favor of the plaintiff. In any event, the important point here is that the Legislature 'did not deprive the plaintiff of the benefit of the orders granting a preliminary injunction and appointing a receiver. They both recited that they were to remain in effect only until decision of the case. And they did remain in effect until final decision of the case. That is to say, when the lower court for the first time entered a-final judgment in the pending main case because it lacked jurisdiction after passage of Act No. 2, the preliminary injunction and receivership were necessarily terminated because of the final judgment in favor of the defendants.2
The plaintiff also contends that the lower court erred in entering judgment without giving him an opportunity to be heard on the validity and applicability of Act No. 2. The district court, as we have seen, without notifying or hearing the parties, entered judgment dismissing the case for lack of jurisdiction on February 25, a few hours after the approval of Act No. 2, despite the fact that the case was set for trial the next morning.
The plaintiff was entitled to the opportunity, both in the district court and in this Court, to assail the validity and applicability to this casé of Act No. 2. Indeed, if a substantial *173question existed as to the validity and applicability of Act No. 2, the lower court would have had the power to preserve the status quo by a restraining order while it determined the substantial question, even if it was ultimately decided as here that Act No. 2 barred this suit. United States v. John L. Lewis et al., 330 U. S. 258, 91 L. ed. 884.
Moreover, in addition to attacking the validity and applicability of Act No. 2, the defendant might have wished to raise some questions concerning the bonds posted herein or the receivership. Or he might have evinced a desire to change his prayer for relief and ask for a declaratory judgment instead of an injunction. See § 4, Act No. 2; Núñez v. Benitez, Chancellor, 65 P.R.R. 812; Cook v. Fortson, 329 U. S. 677, 91 L.ed. 65, 66, footnote 6, separate opinion of Mr. Justice Rutledge. But cf. College of Pharmacists v. Board of Pharmacy, 60 P.R.R. 789; Government of the Capital v. Executive Council, 63 P.R.R. 417. It happens that the plaintiff has made no concrete claims with reference to such matters before us and has confined himself to attacking the validity and applicability of Act No. 2. We therefore find no reason to remand the case for the lower court to pass on them. But even if the plaintiff had wished to press these or other questions in the lower court, the latter deprived him of his opportunity to do so by dismissing the case without a hearing.
In seeking to justify this action of the district court, the defendants cite Casanovas & Cía, Sucrs., Inc. v. Court of Tax Appeals, 61 P.R.R. 52, and Santana v. Salinas, 54 P.R.R. 109. But in those cases no one was deprived of an opportunity to be heard. The parties argued their cases and submitted them to this Court. Thereafter, we concluded that we had no jurisdiction. Consequently, it was our duty to dismiss-the cases. But they are scarcely authority for the proposition that a court, without waiting to hear the parties who may desire to amend their pleadings or raise points which have *174not occurred to the court, should examine its docket and dismiss all the eases in which it believes it lacks jurisdiction.
This case was one of wide public interest. Judges do not live in a vacuum. We know what the rest of the community knows. And we are aware that the immediate purpose of Act No. 2 was to cut oft' the right of the plaintiff to pursue his remedy in this case. Under those circumstances it was highly important that the courts, an independent branch of government, should give the plaintiff every opportunity to demonstrate if he could that Act No. 2 was invalid or did not apply to this case or to make any other contentions. The case was set for hearing on the morning after Act No. 2 was approved. The defendants at the opening of the case would have undoubtedly moved to dismiss in view of the passage of Act No. 2 and the court could have then heard the plaintiff and decided the matter promptly.
We are now satisfied, after hearing the parties and examining the record, the statute and the cases, that the lower court correctly ruled, in view of the contentions made by the plaintiff in this Court, that the suit should be dismissed. But the district court should have waited until the next morning and heard the parties as to the validity and applicability of Act No. 2. We recently emphasized the importance of permitting the parties to argue their causes. We held that it was reversible error in a criminal case tried without a jury for a district court to refuse to permit counsel for the defendant to argue his case after all the testimony had been submitted. People v. Díaz, ante, p. 74. No one has suggested that this Court was entitled to decide the important questions presented by this case without hearing the parties.
We gave the plaintiff such a hearing; we fail to see why the lower court could not have done the same. To wait until the next morning could not have possibly prejudiced the defendants : the properties of the Company never left the possession of Fennell, its General Manager, as the new receiver appointed to replace him never took office. On the other hand, *175the holding of a hearing, however brief, would have conformed to the tradition of onr courts that a party to a canse is entitled to be heard before judgment is rendered against him.
The judgment of the district court will be affirmed.
Mr. Justice Marrero did not participate herein.The plaintiff complains that Act No. 2 leaves the community without a remedy in the courts to protect the expenditure of public funds. But “it must he remembered that legislatures are the ultimate guardians of the liberties and *171welfare of the people in quite as great a degree ae the courts. ’ ’ Justice Holmes, in Missouri, Kansas & Texas Ry. Co. v. May, 194 U. S. 267, 270. “ Courts are not the only agency of government that must be assumed to have capacity to govern.” Justice Stone dissenting in United States v. Butler, 297 U. S. 1, 87. And if public officials violate their public trust, other sanctions, more effective than the judicial, including the use of the ballot, exist in a democracy.
In. view of tlie absolute prohibition contained in § 2 of Act No. 2 against taxpayers' suits, we find no occasion to examine here the validity of Act No. 1. Likewise, this case does not involve a situation where private rights of an individual are directly affected by the operations of the Agricultural Company.