
27 Cal.2d 855 (1946)
HARRY A. LORD, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent.
S. F. No. 17150. 
Supreme Court of California. In Bank.  
Apr. 2, 1946.
 Warren E. Libby for Petitioner. *856
 Robert W. Kenny, Attorney General, and Frank Richards, Deputy Attorney General, for Respondent.
 EDMONDS, J.
 By this original proceeding in prohibition, Harry A. Lord is endeavoring to prevent any present disposition of the fund which is the basis of the controversy in Lord v. Garland, ante, page 840 [168 P.2d 5].
 Lord sued the director and registrar of the Motor Vehicle Department to avoid the payment of fees required by the Caravan Act (Stats. 1937, p. 2253; Deering's Gen. Laws, 1937, Act 5136) upon the ground that the statute is unconstitutional (Lord v. Ingels, 64 Cal.App.2d 599 [149 P.2d 72]). In connection with his suit he obtained a preliminary injunction, and furnished the required undertaking (Code Civ. Proc.,  529), the amount of which he had to increase from time to time as he brought more automobiles into the state. To avoid the inconvenience and expense of filing additional undertakings in support of the injunction, he found it expedient to deposit, in lieu of a bond, the amount of the tax required by the statute under attack.
 Thereafter, upon stipulation, the preliminary injunction was, by order of the court, dissolved, the surety released from liability, and a second order made enjoining the defendants from enforcing the statute upon condition that Lord pay into a special fund to be established by the Motor Vehicle Department $15 for each car caravaned by him to California. By this order, which was based upon the stipulation, the respondent court reserved "continuing jurisdiction until final disposition of said moneys. ..." The pertinent provisions of the stipulation upon which the order was made provided that, "all sums which are so paid shall be retained by ... [the department] ... in a special fund pending the final determination in this proceeding on appeal or otherwise of the constitutionality of the ..." Caravan Act; that in the event the statute "shall be determined to be unconstitutional the sums so paid ... shall be returned upon application to" Lord, "and in the event that the said statute shall be determined to be constitutional the said sums ... shall be retained by the Department. ..." Five years later, the respondent court granted a motion to dismiss the action, pursuant to the provisions of section 583 of the Code of Civil Procedure and without reserving expressly any jurisdiction over said special fund. The judgment of dismissal, subsequently entered, is now final. (Lord v. Ingels, supra.) *857
 Lord asserts that the superior court is about to make an order, upon motion of the defendants, for the payment to the state of more than $88,000 which he deposited in the special fund while the injunction was in force. Upon his petition, this court issued an alternative writ of prohibition and the question presented for decision concerns the jurisdiction of the superior court to determine the motion and to dispose of the money held by the Motor Vehicle Department.
 The petitioner contends that the effect of the final judgment of dismissal in Lord v. Ingels, supra, was to completely deprive the superior court of all jurisdiction to hear any motion unrelated to the judgment, and the motion now pending is of that kind. The petitioner also declares that the court will be exceeding its jurisdiction in two particulars if it disposes of the fund because, (1) the court granting an injunction has no power upon its dissolution to assess damages resulting from the wrongful issuance of the writ; and (2) the court's power to dispose of the fund is limited by the stipulation of the parties that the fund is to be retained by the department until there has been a final determination of the constitutionality of the Caravan Act, supra.
 [1] A writ of prohibition may issue where a lower tribunal acts without or in excess of its jurisdiction, and there is not a plain, speedy, and adequate remedy in the ordinary course of law. (Code Civ. Proc.,  1102, 1103.) [2] After an action has been dismissed under Code of Civil Procedure, section 583, the court is without jurisdiction to hear or determine any motion unrelated to the dismissal of the action. (Cruse v. Superior Court, 102 Cal.App. 290 [283 P. 73]; see, Swortfiguer v. White, 141 Cal. 576 [75 P. 172]; Modoc Land etc. Co. v. Superior Court, 128 Cal. 255, [60 P. 848]; White v. Superior Court, 126 Cal. 245 [58 P. 450]; Cooper v. Gordon, 125 Cal. 296 [57 P. 1006]; Davis v. Hart, 123 Cal. 384 [55 P. 1060]; Vrooman v. Li Po Tai, 113 Cal. 302 [45 P. 470]; People v. Southern Pac. R. R. Co., 17 Cal.App.2d 257 [61 P.2d 1184]; King v. Superior Court, 12 Cal.App.2d 501 [56 P.2d 268]; Pearson v. Superior Court, 122 Cal.App. 571 [10 P.2d 489]; Sauer v. Superior Court, 74 Cal.App. 580 [241 P. 570]; 9 Cal.Jur. 534; 27 C.J.S., p. 261,  77.) [3] However, this general rule is subject to exceptions and a court is not divested of jurisdiction for all purposes after the dismissal of an action. (See, King v. Superior Court, supra; Davis v. Superior Court, 184 Cal. 691 [195 P. 390]; Cooper v. Gordon, *858 supra; Cruse v. Superior Court, supra; 27 C.J.S. 261,  77.) Thereafter the court has the power to determine the disposition of funds held in custodia legis after notice to all parties interested. (In re Shyvers, 33 F.Supp. 643; see, Agricultural Bond & C. Corp. v. Courtenay F. Co-op. Assn., 66 N.D. 122 [262 N.W. 453]; Union Bank & Tr. Co. v. Los Angeles County, 2 Cal.App.2d 600 [38 P.2d 442]; Higgins v. Keyes, 5 Cal.App. 482 [90 P. 972]; Anderson v. Ferguson, 56 Idaho 554 [57 P.2d 325].) [4] Furthermore, in the present case the court by its own order reserved continuing jurisdiction over disposition of all moneys in the special fund, and no final judgment with respect to that phase of the case having been entered at the time of the dismissal of the action, the court retained jurisdiction to complete the matter. (See, McAdoo v. Sayre, 145 Cal. 344 [78 P. 874]; Becker v. Munkelt, 27 Cal.App.2d 761 [81 P.2d 1041]; County of Los Angeles v. Industrial Acc. Com., 76 Cal.App. 639 [245 P. 796]; 14 Am.Jur. 373; 15 C.J. 810; 21 C.J.S., p. 134,  86.)
 [5] A further question for decision is whether the respondent court will be acting in excess of its jurisdiction if it orders the funds delivered to the state. This court has said, "Speaking generally, any acts which exceed the defined power of a court in any instance, whether that power be defined by constitutional provision, express statutory declaration, or rules developed by the courts and followed under the doctrine of stare decisis, are in excess of jurisdiction, in so far as that term is used to indicate that those acts may be restrained by prohibition or annulled on certiorari." (Redlands etc. Sch. Dist. v. Superior Court, 20 Cal.2d 348, 358, 359 [125 P.2d 490], quoting Abelleira v. District Court of Appeal, 17 Cal.2d 280, 291 [109 P.2d 942, 132 A.L.R. 715]; see, Fortenbury v. Superior Court, 16 Cal.2d 405, 407 [106 P.2d 411].) Here the petitioner is asking this court, upon prohibition, to decide who is entitled to the fund held in custodia legis. Although by the dismissal of the action there is only the narrow issue concerning the disposition of the money open for decision, the court has jurisdiction to determine the rights of the parties under the stipulation and order. Consistent with the exercise of that jurisdiction, the court might require that the fund be retained by the Motor Vehicle Department as a special deposit, subject to judicial order, until there is a final determination of the issue of constitutionality in the second suit brought by Lord. It might also require the Motor Vehicle *859 Department to pay the money into court to await the decision of that suit. (See: United States v. Morgan, 307 U.S. 183 [59 S.Ct. 795, 83 L.Ed. 1211].) This court must assume that within the limited field left by the dismissal of the action, the court will fully protect the rights of the parties under the stipulation and order.
 The alternative writ of prohibition is discharged and a peremptory writ is denied.
 Gibson, C.J., Shenk, J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
