delivered the opinion of the court.
This is a petition filed by José Suárez Martínez seeking the issuance of a writ of mandamus directed against Emilio S. Belaval, Judge of the District Court of San Juan, ordering him to set aside the judgment rendered in Civil Case No. R-7367 and to set a day for hearing the parties as to the propriety of the pronouncements contained in said judgment. The petition alleges, in synthesis, the following:
That in Civil Case No. R-7367 of the lower court, an injunction proceeding, wherein petitioner appears as plaintiff and Rexford G-. Tugwell and others as defendants, the respondent judge considered the case ready for trial on its merits and set the hearing for February 26, 1946, at nine o’clock •in the morning; that about five o’clock on the afternoon of February 25, said judge, motu proprio, and without having before him any motion from the parties, or hearing the plaintiff, rendered judgment in said case ordering its dismissal and annulled a restraining order and a preliminary injunction which had been issued in said case; it likewise dissolved the receivership which had been-decreed therein and consequently set aside the hearing to be had on February 26.
It is further alleged that by such action the respondent judge ‘‘failed to comply. . . with his legal duty of making his decisions in accordance with the constitutional clause of due process of law and that if such action were to prevail it would be equivalent to depriving petitioner of his constitutional right to have his day in court and defend his motion for a legal remedy in the proceedings, as well as denying petitioner, by illegally and arbitrarily using any discretionary power that *801said judge may have, the equal protection of laws under which' any citizen of this community may resort to the courts in defense of his rights.”
Lastly, it is alleged that petitioner has no other speedy and adequate remedy at law or equity except mandamus in order to compel respondent to hear petitioner, inasmuch as no immediate relief could he obtained by ordinary appeal or certiorari.
We issued an alternative writ. The respondent judge refused to set aside the judgment rendered in the aforesaid case and to hear the parties as to the propriety of the pronouncements contained in the judgment, and appearing on March 5, 1946, through the Attorney General, alleged, in answer to said writ, that the petition in this case did not lie:
1st. Because it “belies the facts that prompted the respondent judge to act thus, inasmuch as in the brief no mention is made of the grounds on which the judgment of February 25, 1946 was based” nor is there the slightest reference to the approval of Act No. 1 of February 25, 1946 “To amend the title and § 4 of an Act to define injunctions, etc. ” 1 and of Act No. 2 of February 25, 1946 “To prohibit the public action known in equity as the taxpayer’s suit in the courts *802of Puerto Rico.2 It is alleged that these acts being of an urgent character shall take effect immediately after their approval, that is, February 25, 1946, on the same day that the respondent judge rendered judgment.
2. Because since at the time the respondent judge entered his judgment, the injunction proceeding, Civil Case No. R-7367, “was embraced by the prohibitions of Acts Nos. 1 and 2 of February 25, 1946, the respondent, by ordering the dismissal of the case, did nothing more than recognize and declare an act already consummated by the Legislature of Puerto Rico.”
3. Because the pronouncements contained in the judgment are mere judicial formalities imposed on the respondent judge as his ministerial duty by the urgent and imperative mandate of the provisions of the aforesaid acts. Likewise, the suspension of the hearing set for February 26 “was the result of circumstances, inasmuch as by express mandate of the Legislature the action was barred and the respondent judge had lost jurisdiction from the preceding day when the Act prohibiting the taxpayer’s suit was approved” and that said hearing “would not have benefited petitioner José Suárez Martínez, but, on the contrary, all the operations of the Compañía Agrí-cola de Puerto Rico would have remained restrained with incidental losses despite the fact that an act providing the contrary existed.”
4. Because the respondent judge lacks jurisdiction to set *803aside the judgment entered and to hold a hearing for the parties as to the propriety of the pronouncements contained in said judgment because (a) in Puerto -Rico no court is authorized to entertain, or to proceed, with actions of the nature of Civil Case R-7367; (6) Acts. Nos. 1 and 2 of February 25, 1946, are constitutional and valid; (c) Act No. 1, supra, is an adjective law which does not prejudice substantive rights and hence does not violate the Organic Act or the Constitution of the United States, and (d) Act No. 2, supra, does not affect substantial rights either, neither does it conflict with the Organic Act or the United States Constitution but merely refers to a proceeding, which, in the jurisdictions where it is recognized, stems from public policies, and does not lie where the contrary is provided by law.
Several defendants in Civil Case No. Rr-7367 sought leave to intervene and oppose the petition. Leave was granted and they filed an opposition to the petition herein, and after admitting and denying certain facts alleged, they contended that mandamus did not lie:
(а) Because the petition is insufficient.
(б) Because it fails to allege that petitioner at any time asked the respondent judge to set aside the judgment rendered and set a day for hearing the parties as to the propriety of the pronouncements made, and because it does not set up that the action is of public interest or a class suit in order to dispense with the above requirement.
(c) Because the petitioner has reproduced the judgment rendered inadequately and differently from the true judgment entered, presenting a defective, incomplete and misleading-version thereof.
(d) Because the judgment rendered is final, having disposed definitively of the controversy and leaving petitioner-free to proceed with the defense of his alleged right in the ordinary course of law.
(e) Because the fact that petitioner is plaintiff in case No. R-7367 does not mean that he has an interest in the is*804suance of the writ of mandamus, the truth being that petitioner appears in said action in the name and in behalf of all the taxpayers of huerto JLiico, alleging as his sole interest the fact that he is a citizen of the United States and Puerto Kieo and that he is a taxpayer.
(/) Because the judgment entered by the respondent judge has nothing to do with the constitutional clause of due process of law: (1) because it does not allege that it prejudices the life, property, or liberty of the petitioner, inasmuch as neither in this proceeding nor in the main action is the life, property, or liberty of the petitioner involved and (2) because petitioner has other remedies at law to review the judgment.
(g) Because as soon as judgment was rendered petitioner could have (1) prayed the judge to set it aside until he could be heard on the issues raised; (2) sought a review by way of certiorari to this court and (3) brought an appeal therefrom to this court.
The interveners further alleged that Act No. 1, supra, rendered null and void any preliminary injunction or restraining order which had been issued under the same circumstances as those annulled by the respondent judge, and was in force at the time said statute went into effect, and that Act No. 2, supra, divested the lower court of jurisdiction to entertain petitioner’s ease or to proceed, and that having lost said jurisdiction the only duty that rested with the judge was to announce such fact, dismiss the case, and annul the injunction and the restraining order issued, and this he could do on motion of the parties or motu proprio.
■ After a hearing, and on motion of the parties, they were granted a term to file briefs. Petitioners as well'as the inter-veners have filed theirs. The respondent judge waived his right to present a brief and stated that he approves and accepts that of the interveners.
The latter have also filed a motion alleging that “by virtue of the provisions of Act No. 2 of 1946, this court lacks jurisdiction to take cognizance of the present case,” because “the *805petitioner in this ease has no other or greater interest than he has in the main action and that this kind of action has been prohibited in all the courts of Puerto Rico by the aforesaid statute.” Assuming, without deciding, that we have jurisdiction, despite Act No. 2 of 1946, we believe that the petition in this case should be denied on other grounds which we shall now consider.
It is advisable to state here that petitioner, ratifying his statements at the hearing, limits the scope of his petition in his brief as follows:
“. . . In the mandamus petition before this court we are solely concerned with the dismissal of the injunction proceeding’without giving the plaintiff an opportunity to bé heard. Irrespective of the scope of Acts Nos. 1 and 2 or the effect they may have on said proceeding, the action of the lower court in ordering the dismissal of the case without notifying the plaintiff or giving him an opportunity to be hcai'd is the only ground of our petition.
'■‘The question of whether Acts Nos. 1 and 2 are unconstitutional is not before this court on this occasion. The error committed by the lower court in failing to give petitioner an opportunity to be heard renders the dismissal of the case entirely void, (Mayagüez Sugar Co. v. Court of Tax Appeals, 60 P.R.R. 737; Casanovas & Co. v. Court of Tax Appeals, 61 P.R.R. 630; Figueroa v. Savings & Loan Fund Association, etc., 60 P.R.R. 82), and the fact that said dismissal might be considered well-grounded does not constitute a valid defense against the writ of mandamus.” (Italics ours.)
The three cases cited by petitioner are inapposite. None of them involved a mandamus. Figueroa v. Saving & Loan Fund Association, etc., was an appeal from a judgment in an injunction proceeding and it was held therein that “For a reversal of the judgment it would be sufficient to consider the last two assignments of error, wherein the question is raised of the judgment having been rendered without giving the defendant an apportunity to submit evidence.”
In Mayagüez Sugar Co. v. Court of Tax Appeals, a certio-rari was filed against a decision of the Tax Court wherein *806said court decided a case pending before the Board of R,eview and Equalization without a hearing and we held that said decision, without giving the taxpayer an opportunity to be heard, was void.
The same doctrine was established in the third case, Casanovas & Co. v. Court of Tax Appeals, which was also a cer-tiorari proceeding against the same court.
The controversy has been limited by petitioner himself, and although we do not approve the action of the respondent judge as the proper one to be followed by the lower courts in other cases pending decision, we are of the opinion that the peremptory writ of mandamus sought should not be granted for the following reasons:
We have repeatedly held3 that mandamus does not lie unless petitioner alleges that he has asked the respondent officer or body to act in the manner sought to be ordered. The most- recent case is that of Medina v. Fernós, 6.4 P.R.R. 816. There we set forth the general rule'with its exceptions, too recent- to be repeated here.
From the petition it does not appear that the respondent judge was asked to reconsider the judgment rendered or to hear the petitioner as to whether said judgment or any pronouncement contained therein should be set aside; on the day of the hearing petitioner’s attorney admitted that he had not asked the respondent judge because, in his opinion, he would have refused. A litigant should never presume beforehand how a judge shall act. The presumption is that every judge, conscious of the oath he has taken upon being qualified for office, shall decide according to the findings and the applicable law. We are only asked to order the respondent judge to do precisely what petitioner has refused to ask the judge himself. *807Petitioner conld have raised in his motion for reconsideration all the questions which, according to his brief, he wished to discuss in the lower court first. Furthermore, petitioner could have raised other questions concerning the new situation created by the approval of Acts Nos. 1 and 2 of 1946, and whether he was entitled to amend his complaint in order to conform it to the terms of said Acts. The reason why a motion of reconsideration must be presented in a case like the one at bar is because upon judgment having been rendered by the judge sua sponte, said motion would have given the lower court an opportunity to hear the petitioner, decide the question raised and cure the error, if any, which might have been committed. Cf. Las Monjas Racing Corp. v. District Court, 40 P.R.R. 282 and p. 283. If the reconsideration had' been denied he could have appealed to this court from- said pronouncement as well as from the judgment. Possibly, certiorari might lie under Act No. 32 of 1943.
Petitioner may avail himself, of other adequate remedies in the ordinary course of the law and, therefore, mandamus does not lie to review the manner in which a final judgment was rendered because under § 651 of the Code of Civil Procedure (Section 3, Mandamus Act) this writ “may not be issued in any case where there is plain and adequate remedy in the ordinary course of the law.” See 'among others the following cases: Maitin et al. v. Castro, 14 P.R.R. 282; Meléndez et al. v. Cuchí, Registrar of Property, 15 P.R.R. 641; Puente et al. v. Foote, District Judge, 17 P.R.R. 853; Dyer v. Rossy, 23 P.R.R. 718; “El Áncora” v. Brenes, 39 P.R.R. 720; People v. District Court, 47 P.R.R. 226; People v. La Costa, Jr., Judge, 59 P.R.R. 178; it having been decided in People v. District Court, 47 P.R.R. 226, and Smallwood v. District Court, 53 P.R.R. 707, that mandamus lay where in the absence of an ordinary remedy by appeal a lower court erroneously holds that it has no jurisdiction to entertain a case or to proceed.
*808As to the different phases of this question see the lengthy annotations in 4 A.L.R. 582 and 82 A.L.R. 1163.
In Smallwood v. District Court, supra, the cases of Boone v. District Court, 38 Idaho 688, 224 P. 429; Hargadine-McKittrick Dry Goods Co. v. Garesche, 227 S.W. 824 (Mo.), and State ex rel. Musselshell County et al. v. District Court, 89 Mont. 531, 300 P. 235, were cited with approval. In the latter case it was held, that:
“If a court erroneously decides, as a matter of law, that it has no jurisdiction, and thus denies a litigant the right to be heard on the merits, and refuses to determine the facts, or to proceed, it has failed to perform a duty imposed by law, and mandamus will lie, unless there is a specific and adequate remedy by appeal, writ of error, or other method of revieiu.” (Italics ours.)
In In re Key, 189 U. S. 84, the court stated: “The writ -of mandamus cannot he used to perform the office of an appeal or writ of error, and does not lie to review a final judgment or decree sustaining a plea to the jurisdiction, even if no appeal or writ of error is given by law. It is not granted in doubtful cases, or where there is another adequate remedy, and whether it shall go or not usually rests in the sound discretion of the court.” *
Pursuant to the above authorities and applying them to the facts before us, mandamus would only lie if the petition alleges that the lower court has erroneously held that it lacks jurisdiction and where there is no adequate remedy by appeal. However, petitioner has not placed us in a position to decide, nor is he interested in our deciding, whether the lower court had jurisdiction to proceed with case No. IL-7367. His petition is solely concerned with obtaining a hearing for which he could have directly asked the lower court at any time. This, by itself, as we have already said, is not sufficient to warrant the issuance of mandamus. The petition should have alleged affirmative facts to the effect that the complaint in the principal suit adduced a cause of action over which, despite Acts Nos. 1 and 2 of 1946, the lower court had jurisdiction. *809Not only does the petition fail to allege this, but we do not even know the questions that are alleged in said complaint.
None of the cases cited by the petitioner in his brief support the theory that mandamus lies to compel a court to hear the parties before rendering a final judgment or ordering the dismissal of a case for lack of jurisdiction to take cognizance thereof. '
We wish to make it clear that in denying the petition in this ease we are not insinuating that the lower court acted correctly in deciding that it had lost jurisdiction. The only question raised by petitioner is that by way of mandamus we compel the respondent judge to give him a hearing and it is this and nothing more what we hereby deny.
The alternative writ issued must be annulled and the petition denied.
Section 3 of this Act amends § 4 of the Injunction Act, in its pertinent part, as follows:
“Section 4. — An injunction or restraining order cannot be granted:
* * * * * *
“3. To restrain the application or enforcement of any statute of the Legislature of Puerto Rico, or the performance by a public officer, a public corporation, or a public agency, or by any employee or officer of such corporation or agency of any act authorized by a law of the Legislature of Puerto Bieo, unless it has been determined by final, firm, unappealable, and unreviewable judgment that such statute or act authorized by law is unconstitutional or invalid.
“Any injunction, preliminary, permanent, or of the nature of a restraining order, including any order to enforce the jurisdiction of a court or to secure the enforcement of any judgment, issued under the circumstances set forth in this clause 3 and in force on the date this Act takes effect, or which may hereafter be issued, shall be null and ineffective.
Sections 2 and 3 of this Act provide:
“Section 2. — The action known in equity as taxpayer’s suit is hereby prohibited.
“Section 3. — Ko court of I’/ucrto Eico shall have jurisdiction to take cognizance, or, if an action 1ms been already instituted, continue to take cognizance, whether in -first instance or on appeal, of any action or proceeding in which the validity or constitutionality of any Act or Eesolution of the Legislature of Puerto Eico, or any act of a public' official authorized by .law of the Legislature of Puerto Eico, is challenged, when the plaintiff -alleges in such action or proceeding- no other interest or other capacity to sue, than that of being a taxpayer or of representing taxpayers as a class, and that as such, he sustains or may sustain damages by virtue of ¡Said Act, Eesolution, or act.’’
See Zavala et al. v. Executive Council of Puerto Pico, 9 P.R.R. 191; Negrón et al. v. Supervisor of Elections, 11 P.R.R. 352; Morales v. Wilson et al., 16 P.R.R. 714; Pacheco et al. v. Cuevas Zequeira, Dist. Judge., 27 P.R.R. 192; Martínez Nadal et al. v. Saldaña, 33 P.R.R. 687; Sucrs. of A. Mayol Co., Inc. v. McLeod, 44 P.R.R. 32; Urdaz v. Padín, Commissioner, 48 P.R.R. 297; Colón v. Industrial Commission, 55 P.R.R. 14.