
19 Cal.2d 14 (1941)
JAMES IRVINE, Petitioner,
v.
CALIFORNIA GIBSON, County Treasurer, etc., et al., Respondents.
Sac. No. 5430. 
Supreme Court of California. In Bank.  
Nov. 14, 1941.
 W. Coburn Cook for Petitioner.
 George Herrington and Orrick, Dahlquist, Neff & Herrington, as Amici Curiae, on behalf of Petitioner.
 Horace B. Wulff, Thomas Rutledge, Huston, Huston & Huston and Hudson Ford for Respondents.
 Milton T. Farmer and Edward G. Chandler, as Amici Curiae, on behalf of Respondents. *15
 EDMONDS, J.
 The petitioner is the owner of bonds in the face amount of $16,000 issued by the respondent reclamation district pursuant to the provisions of section 3480 of the Political Code. The bonds matured on January 1, 1936, and $10,400 of the original principal sum was paid on April 26, 1939. Interest upon the total amount of $16,000 has been paid in full to date of maturity. The purpose of this proceeding in mandamus is to compel the payment of the $5,600 of principal remaining unpaid, together with interest upon $16,000 from date of maturity to April 26, 1939, and upon $5,600 from the last named date.
 As grounds for the issuance of the writ of mandate, the petitioner pleaded the facts which have been stated and that there is sufficient money in the bond fund of the respondent district to pay the amounts claimed by him as well as all other obligations of that fund. The following was also alleged: On December 27, 1938, petitioner commenced an action in the superior court, naming as defendants the persons who are the respondents in this proceeding and also the reclamation district. As the cause of action in that suit he stated the same facts relating to his ownership of the bonds and the payment of principal and interest thereon as are alleged in the present proceeding and prayed judgment for $5,600 and interest upon unpaid principal from January 1, 1936. That action is now at issue and is ready for trial.
 The respondents demurred to the petition and by answer denied the allegations of the petitioner that the respondent treasurer "refuses to pay the amount remaining of the principal of said bonds except upon surrender of the bonds and waiver of interest." They also pleaded, in both demurrer and answer, that the petitioner's right to recover is barred by the statute of limitations.
 The writ of mandate must be issued "in all cases where there is not a plain, speedy and adequate remedy, in the ordinary course of law." (Sec. 1086, Code Civ. Proc.) [1] Whether, in a particular case, the writ should issue, lies, to a considerable extent, in the discretion of the court to which the application is made. (Rogers v. Board of Directors of Pasadena, 218 Cal. 221 [22 PaCal.2d 509]; Hitch v. Superior Court, 2 Cal.App.2d 406 [38 PaCal.2d 190]; 16 Cal.Jur. 768.) [2] The right to the writ must be clear and certain (Dobyns v. Cheshire, 9 Cal.App.2d 77 [48 Pac. *16 (2d) 743]), and mandamus may not be resorted to as the substitute for an adequate legal remedy. (McPherson v. City of Los Angeles, 8 Cal.2d 748 [68 PaCal.2d 707]; Northrup v. Haynes, 15 Cal.App.2d 665 [59 PaCal.2d 1056]; Coon v. Biscailuz, 1 Cal.App.2d 346 [36 PaCal.2d 430]; Potomac Oil Co. v. Dye, 10 Cal.App. 534 [102 P. 677].) The purpose of the writ in this state, as at common law, is to prevent a failure of justice.
 [3] The petitioner in the present proceeding has not only shown that there is an adequate legal remedy for the enforcement of the right which he claims, but also that he is concurrently pursuing that remedy. Without bringing his action in the superior court to trial, he is attempting, by this proceeding in mandamus, to attain the same result for which he brought suit. In this respect he is in exactly the same position as the petitioner in Keyston v. Banta-Carbona Irr. Dist., 19 Cal.App.2d 384 [65 PaCal.2d 371], where the proceeding was dismissed upon a showing that there was an action pending which involved the same parties and issues.
 Also, the petitioner in the present case, is not only proceeding in both courts but he is relying upon the pending action in the superior court as the basis of his asserted right to a writ of mandate. In his brief, he contends that the statute of limitations applicable to the bonds is four years and that it is not suspended by the lack of funds in the hands of the county treasurer to meet principal and interest upon them. But he declares that he is entitled to the writ because the suit which he filed has tolled the statute.
 Under these circumstances, it is obvious that, even if the rule of the Keyston case was not applied, the issues presented in the instant proceeding may not properly be decided by this court. So far as the bar of the statute of limitations is concerned, the petitioner's rights should be determined by the superior court as of the date when he filed the suit which he now contends has tolled the statute of limitations. That court should also determine the question of fact raised by the treasurer's answer here, which, under long established practice, would compel a reference.
 The proceeding is dismissed without prejudice to the petitioner's rights to prosecute the pending action.
 Gibson, C.J., Shenk, J., Curtis, J., and Traynor, J., concurred. *17
 CARTER, J.,
 Dissenting.
 I dissent.
 The petitioner first sought a writ of mandate in this case in the District Court of Appeal, Third Appellate District. Respondents demurred and answered, but there was no denial of petitioner's allegation that he had no speedy or adequate remedy at law. The District Court of Appeal prepared a comprehensive decision on the merits of the controversy. No suggestion was made in that decision or by any of the parties to the proceeding that mandamus was not the appropriate proceeding to determine the issues. The decision being against petitioner he petitioned the District Court of Appeal for a rehearing and filed therein an amended petition for a writ of mandate in which he alleged that prior to the filing of the original petition for a writ of mandate he had commenced an action at law in the superior court to recover the principal and interest on the bonds, the payment of which was sought to be compelled by the mandamus proceeding, and that that action tolled the statute of limitations. The rehearing and amended petition were denied. A hearing by this court was granted and the cause thereby transferred to this court for hearing and decision.
 The case has been comprehensively and ably briefed on the merits. Several amici curiae have filed briefs in the case.
 One of the main issues in the controversy is whether or not reclamation district bonds bear interest after maturity, an issue which is of considerable public importance and may well involve many bondholders as well as numerous public corporations and agencies of the state. It may well be that an uncertainty in the law in that respect will result in such agencies being burdened with additional obligations, that is, the interest accruing pending a determination of the issue, if the ultimate conclusion is that interest is payable after maturity. The time attendant upon a trial of the case in the superior court followed by an appeal, would bring about such a result.
 Under the circumstances above outlined, I believe that it is an improper and unjustifiable exercise by this court of its discretion to refuse to decide the merits of this case merely because petitioner has a remedy at law in the lower court. If the writ is to be denied on that ground it should have been done in the first instance and not after counsel have expended *18 valuable effort and time, as well as money presenting the case, and a decision thereon has been rendered on the merits by the District Court of Appeal, and a hearing granted by this court. While it may be true as a general rule that this court in its discretion may refuse to issue the writ for the reasons advanced in the majority opinion, I believe that under the circumstances here presented, technicalities and form should give way to considerations of public importance and fair treatment of counsel and the litigants here involved. No useful purpose can be served by compelling the parties to litigate the cause anew in the superior court. An appeal would in all probability be taken from any judgment entered therein. The whole subject would have to be again briefed and presented to an appellate court and a decision prepared by the latter. To require that unnecessary delay and repetition is not consonant with the function of courts or with the worthy policy of speeding up the judicial machinery to the end that justice shall be a reality rather than a myth.
