
29 Cal.2d 754 (1947)
THE PEOPLE, Petitioner,
v.
SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO, Respondent; C. V. PIERPONT, Real Party in Interest.
S. F. No. 17342. 
Supreme Court of California. In Bank.  
Mar. 3, 1947.
 Robert W. Kenny, Attorney General, and Harold B. Haas, Deputy Attorney General, for Petitioner.
 Emmett R. Burns and Frank W. Prideaux, Jr., for Respondent and Real Party in Interest.
 SHENK, J.
 This is an application on behalf of the State of California to prohibit the superior court in and for the city and county of San Francisco from entertaining further proceedings as against the state in an action wherein the plaintiff seeks to recover damages for personal injuries. The pending action is entitled "C. V. Pierpont v. Southern Pacific Company, a corporation; State Belt Railroad, State of California, General American Transportation Corporation, a corporation," and others, and is numbered 338296 in the respondent court.
 In the amended complaint it is alleged that the State of California "acting in a proprietary capacity," operated, managed and controlled, along the waterfront in the city and county of San Francisco, the State Belt Railroad, a common carrier for hire in intrastate and interstate commerce; that on May 25, 1944, a railroad tank car leased by the defendant General American Transportation Corporation was conveyed by the defendant Southern Pacific Company to the State Belt Railroad for delivery to W. R. Grace & Co. in San Francisco; that the plaintiff, in the discharge of the duties of his employment, climbed the ladder to the platform on the top of the tank for the purpose of sampling and testing the contents of the tank car; that because of the carelessness of each of the defendants in maintaining the ladder and platform on the tank car in a dangerous and defective condition, the plaintiff was thrown to the ground and suffered the injuries for which he seeks recovery. Rejection of a claim filed with the State Board of Control was also alleged. *756
 The respondent court overruled the demurrer to the amended complaint with leave to answer. By its demurrer the state interposed the legal defense of sovereign immunity. The principal question for determination is whether the state as a sovereign entity may be subjected to liability for the alleged tort.
 A preliminary question concerns the propriety of the present proceeding. In the return to the alternative writ it is contended that prohibition is here sought for the purpose of correcting judicial error and that the petitioner should be relegated to the remedy by appeal.
 [1] The defense of sovereign immunity from suit presents a jurisdictional question (Monaco v. Mississippi, 292 U.S. 313 [54 S.Ct. 745, 78 L.Ed. 1282]; Kansas v. United States, 204 U.S. 331 [27 S.Ct. 388, 51 L.Ed. 510]). Prohibition may therefore be invoked under the conditions prescribed by section 1102 et seq., of the Code of Civil Procedure. Assuming that there would be a remedy by appeal in the pending action, the importance of the principal question is sufficient to support the present proceeding to the end that the issue speedily be determined. (Rescue Army v. Municipal Court, 28 Cal.2d 460, 467 [171 P.2d 8].) [2] The fact that the peremptory writ may be denied in no way forecloses the court from exercising its constitutional and statutory power to entertain the proceeding.
 The theory of sovereign immunity originated in the fiction that the king can do no wrong. It may be said that the doctrine arose in former times from the practical necessity of enabling the state to exercise its governmental functions unhampered by the demands on the exchequer resulting from the carelessness or mistakes of its officers and agents in the discharge of their official duties. In the words of Story, Agency, 8th edition, section 319, the government "does not undertake to guarantee to any persons the fidelity of any of its officers or agents whom it employs; since that would involve it, in all its operations, in endless embarrassments, and difficulties, and losses, which would be subversive of the public interests." The doctrine has had widespread acceptance as a part of the American common law, and has been deemed to prevail except where it had been departed from by constitutional and statutory law, as interpreted and applied by the courts. (See statutes and cases collected in series of articles, vol. 9, Law and Contemporary Problems, p. 179 et seq.; also *757 in Article, Limitations on the Doctrine of Governmental Immunity from Suit, 41 Columb.L.Rev. p. 1236.)
 The general expression of the doctrine of sovereign immunity is that the state may not be sued without its consent. (Whittaker v. County of Tuolumne, 96 Cal. 100, 101 [30 P. 1016].) Section 6 of article XX of the state Constitution provides that "Suits may be brought against the State in such manner and in such courts as shall be directed by law." (Const. of 1849, art. XI,  11, revised 1879.) In 1893 (Stats. 1893, p. 57) the Legislature enacted a statute providing that "All persons who have, or shall hereafter have, claims on contract or for negligence against the State not allowed by the State Board of Examiners, are hereby authorized, on the terms and conditions herein contained, to bring suit thereon against the State in any of the Courts of this State of competent jurisdiction, and prosecute the same to final judgment." The foregoing act preceded section 688 of the Political Code (Stats. 1929, p. 891, as amended), which in turn was superseded by sections 16041 et seq. of the Government Code (Stats. 1945, p. 511). Section 688, applicable here, provided that any person having a claim "on express contract or for negligence against the State" must present the claim to the State Board of Control in accordance with specified procedure and limitations, but if the claim be not allowed, he was authorized, subject to the conditions contained in the section, "to bring suit against the State on such claim and to prosecute such suit to final judgment."
 Prior to the enactment of the statute of 1893, this court was called upon to determine such a question apart from any general statutory consent on the part of the state. Green v. State (1887), 73 Cal. 29 [11 P. 602, 14 P. 610], involved a canal constructed by a levee commission empowered to straighten the channel of the American River for the protection of the city of Sacramento under an act of 1862. A statute enacted in 1885 authorized the plaintiffs and others to institute actions against the state for damages occasioned by the construction. The principle was approved that when the state authorizes itself to be sued, and there is no statutory or constitutional provision fixing a different liability, its measure of responsibility is to be determined by the same rule as that which determines the liability of one of its own citizens. But the court pointed out that the application of that measure was not to be deemed an admission of liability where the state *758 was acting in a sovereign capacity; that is, where it was engaged in a public work for the common good, or, as it might be said, in a governmental activity, as distinguished from a nonsovereign or commercial enterprise. The construction work there involved was held to be a public work for the common good; and in any event that the state could not be held liable for damage which it was shown was not the natural consequences of the work, but which was remote and could not have been anticipated or expected as the result.
 The concept of state liability for tort which the court expressed in the Green case was not entirely new. In 1859, in Western & Atlantic Rail Road Co. v. Carlton, 28 Ga. 180, the question of state liability for negligence in the operation of a railroad was involved. The court said: "When a State embarks in an enterprise which is usually carried on by individual persons or companies, it voluntarily waives its sovereign character and is subject to like regulation, with persons engaged in the same calling. ... We think, then, that the State engaging in the carrying business, assumes the obligations and liabilities incident to that business when carried on by individuals. ..." (See, also, State Liability for Tort, 30 Harv.L.Rev. 20, and cases there cited.)
 The petitioner contends that that distinction is not the law of this state in view of subsequently decided cases. Reference is also made to section 400 of the Vehicle Code and similar liability statutes as indicating a policy not to waive immunity from tort liability except where a statute expressly so provides. The later cases will be examined.
 In Chapman v. State (1894), 104 Cal. 690, 693 [38 P. 457, 43 Am.St.Rep. 158], it was said to be well settled that in the absence of a statute voluntarily assuming liability, the state is not liable in damages for the negligent acts of its officers while engaged in discharging ordinary official duties pertaining to the administration of the government of the state. The facts there involved occurred prior to the enactment of the act of 1893 (Stats. 1893, p. 57), by which state consent to be sued for claims on contract or for negligence was first given. Thirty tons of coal, standing on the wharf in San Francisco which was subject to the jurisdiction and control of the State Harbor Commissioners, had sunk because the wharf gave way due to negligence in failing to maintain it in sound condition. The court pointed out that the loss occurred before the passage of the 1893 act, and held that the constitutional inhibition *759 against making a gift of public money forbade legislative action in creating a liability against the state for any past act of negligence. The question of the prospective effect of the act, that is, whether it was a "statute voluntarily assuming liability," was left open. The court concluded, however, that a contractual liability existed prior to the 1893 act and that the plaintiff suffered a loss based on the contract right which was recoverable in the action as an additional remedy given by the 1893 act. The judgment entered upon an order sustaining a demurrer to the complaint was reversed on that ground.
 A similar situation was presented in Melvin v. State (1898), 121 Cal. 16 [53 P. 416], where in 1891 the plaintiff was injured by a stand collapsing during the conduct of a state fair. The court rejected the contractual theory as a basis of recovery and followed Chapman v. State, supra (104 Cal. 690), in its refusal to apply the act retroactively in order to create a liability for tort. In the Melvin case it was pointed out that the agency established for the conduct of the state fair existed solely for the purpose of promoting the public interest in the business of agriculture and kindred objects, that it was an agency of the government, and in no sense an organization for pecuniary profit to the state. (See, also, Dillwood v. Riecks, 42 Cal.App. 602 [184 P. 35].)
 Denning v. State (1899), 123 Cal. 316 [55 P. 1000], directly involved the question of prospective operation of the act of 1893 on state liability for tort. There an act of negligence by the Board of State Harbor Commissioners occurred after the passage of the act. However, the court did not take note of the problem left open in the prior cases. It merely applied the language of the decisions in Chapman v. State, supra (104 Cal. 690), and Melvin v. State, supra (121 Cal. 16), as holding that the statute of 1893 "did not create any liability or cause of action against the state where none existed before, but merely gave an additional remedy to enforce such liability as would have existed if the statute had not been enacted." Thus there was adopted in this state the doctrine that state consent to be sued for negligence did not waive sovereign immunity from liability for tort. In the Denning case, however, the question was considered whether in the performance of the plaintiff's duties the state was exercising a business function as distinguished from the discharge of a governmental duty. The court distinguished between governmental and *760 nongovernmental functions of the board, holding that the plaintiff was employed in a distinct branch of the service, viz., the protection against or extinguishment of fires, which even in the case of municipal corporations was uniformly held to be the exercise of a purely governmental function; and that there was just as strong ground for distinguishing between governmental and proprietary functions of the Board of State Harbor Commissioners.
 In Welsbach Co. v. State, 206 Cal. 556, 558-9 [275 P. 436] (an action for refund of taxes paid under protest), it was held that an action on the implied contract was within the act. The court pointed out that prior to 1893, claimants on contract or for injuries due to negligence of state officials or employees were not permitted a recovery against the state in the courts, but were relegated to the uncertain mercies of the Legislature for relief; and that it was doubtless for the purpose of a definite departure from the long held rule of law that the sovereign could not be made a party to actions of any sort against it without its consent, that the Legislature of California, in its wisdom, saw fit to adopt the act of 1893. However, after the adoption of the consent statute the doctrine of sovereign nonliability for tort has been deemed to apply to state governmental agencies in the discharge of official duties. (See, also, Walker v. Department of Public Works, 108 Cal.App. 508 [291 P. 907]; Rauschan v. State Comp. Ins. Fund, 80 Cal.App. 754 [253 P. 173]; Western Assurance Co. v. Sacramento & S. J. Drainage Dist., 72 Cal.App. 68 [237 P. 59].)
 Distinction between governmental operations and those of a proprietary nature was made in The Western Maid, 257 U.S. 419, at 433 [42 S.Ct. 159, 66 L.Ed. 299], in reference to government liability for negligence committed by a transport vessel. In that case it was said in substance that since the United States had not consented to be sued for torts, it could not be said in a legal sense to have been guilty of a tort. From this statement the conclusion was drawn by text writers that "If the state or federal government consents to be sued, however, it may be made responsible for torts." (Vol. 9, Law and Contemporary Problems, at p. 188.) It has also been said that the state enjoys immunity, not because of any inherent perfection, but rather because of a lack of remedy against it. (Vol. 9, Law and Contemporary Problems, at p. 219.)
 Exponents of the most extreme application of the doctrine of sovereign immunity hold that the language of a statute *761 giving consent to be sued in contract or tort (although it gives consent to be liable in contract) does not give consent to liability for tort; but that express constitutional or legislative consent must appear before tort liability attaches. This view is expressed in decisions such as Riddoch v. State, 68 Wash. 329 [123 P. 450, Ann.Cas. 1913E 1033, 42 L.R.A.N.S. 251], where it was held that consent by the state to be sued on a claim imposes no new liability and the immunity of the sovereign is a defense which has not been waived. The Washington court stated that if a distinction existed between state governmental functions and acts considered nongovernmental or commercial, the facts (involving an injury to the plaintiff by the falling of a defective rail from a balcony in the state armory rented for the evening for athletic entertainment), did not warrant drawing the distinction favorably to the plaintiff.
 It is of interest to note that prior to 1939 a consent statute of New York included a provision that "in no case shall any liability be implied against the state." (Smith v. State of New York, 227 N.Y. 405 [125 N.E. 841, 13 A.L.R. 1264].) In 1939 the Legislature adopted the New York Court of Claims Act by which the state waived both its immunity from suit and its immunity from liability, and expressly consented to have its liability determined in accordance with the same rules of law as applied in actions against individuals or corporations. Similarly, it is now no longer necessary to seek redress through congressional action for tortious acts committed by agents of the federal government. Effective August, 1946, is the "Federal Tort Claims Act" (Tit. IV, Pub. L. 601, ch. 753, 79th Cong., 2d Sess.), which permits suits on tort claims including those for personal injury or death caused by the negligent or wrongful act or omission of any employee of the government while acting within the scope of his employment, under circumstances where the United States, if a private person, would be liable in accordance with the law of the place where the act or omission occurred.
 [3] With the possible exception of Rauschan v. State Comp. Ins. Fund, supra (80 Cal.App. 754), which followed Riddoch v. State, supra (68 Wash. 329 [123 P. 459, Ann.Cas. 1913E 1033, 42 L.R.A.N.S. 251]), the decisions in this state do not foreclose, but seem to favor the proposition that sovereign liability exists for negligence in the state operation of an industrial or business enterprise. Therefore, pursuant to *762 those decisions headed by the case of Green v. State, supra (73 Cal. 29), it should be concluded that where the state engages in industrial or business enterprises, as distinguished from purely governmental activities, tort liability attaches and may be adjudicated pursuant to the consent statute. In so far as the decision in Rauschan v. State Comp. Ins. Fund, supra (80 Cal.App. 754), is not in harmony with the conclusion herein, it is disapproved.
 The enactment of liability statutes such as section 400 of the Vehicle Code does not require a different conclusion. That section affords an injured person the right to sue the state (or any of its political subdivisions, etc.) for damages ensuing from the negligence of any officer, agent or employee in the operation of a motor vehicle while acting in the scope of his employment. Section 401 excepts responsibility for acts of members of police and fire departments occurring in the operation of motor vehicles while responding to emergency calls, but not when returning therefrom. (Cf. Ed. Code,  1007, relating to liability of school districts for negligence.) It is apparent that the liability expressly consented to by the foregoing provisions of the Vehicle Code, is that for torts committed in the operation of motor vehicles in the discharge of any duty (with the exception noted), whether of a public and governmental, or a commercial and nongovernmental nature. But it does not follow that prior to the adoption of the Vehicle Code sections and subsequent to the enactment of a consent statute, state liability would not attach for negligence committed in the discharge of a duty connected with a nongovernmental or business enterprise conducted by the state.
 The considerations of an asserted subversion of public interests by embarrassments, difficulties and losses, which developed the doctrine of nonliability of the sovereign in former times, are no longer persuasive in relation to an industrial or business enterprise which by itself may be looked to for the discharge of all appropriate demands and expenses growing out of operation.
 [4] The State Belt Railroad is operated by the Board of Harbor Commissioners pursuant to sections 3150-3165 of the Harbors and Navigation Code, as a public carrier for hire but without profit along five miles of the waterfront in San Francisco. It serves interstate and intrastate commerce as a connective link between some forty-five wharves, one hundred and seventy-five industrial plants, freight car ferries, and *763 three other interstate rail carriers. Its operations have been described in Maurice v. State, 43 Cal.App.2d 270 [110 P.2d 706]; United States v. State of California, 297 U.S. 175 [56 S.Ct. 421, 80 L.Ed. 567]; and State of California v. Anglim, 129 F.2d 455. In those decisions the courts rejected the contention that due to the absence of the profit motive in the operation of the railroad, the state was immune as a sovereign from the application of the statutes there severally involved. There is some support in those cases for the conclusion that the Belt Railroad is a commercial, industrial or business venture distinct from any necessary state governmental function, although it exists for the purpose of facilitating the commerce of the port and no profit is derived therefrom. The fact that the service is conducted for the benefit of commerce and without profit is insufficient to take it out of what otherwise would be an industrial and commercial character. The additional fact that the expense of opeartion, including damages for negligent operation, is primarily a burden on industry and commerce, and the fact that the business of transportation for hire is usually undertaken by private individuals or corporations and not by government, support the conclusion that the operation of the railroad is not in the exercise of a governmental function, but constitutes a commercial or business enterprise in the negligent operation of which the state may be held liable.
 It follows that the respondent court has power to proceed with the pending action as against the petitioner.
 The petition for the peremptory writ of prohibition is denied, and the alternative writ is discharged.
 Gibson, C.J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
 EDMONDS, J.
 Aside from the question as to whether the state is liable for a tort committed in the operation of the Belt Line Railroad, I am of the opinion that prohibition is not an appropriate remedy. Upon that ground I concur in the judgment.
 A writ of prohibition may issue only 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 of Civ. Proc.,  1102, 1103.) "It is the universal rule that mere error, irregularity, or mistake in the *764 proceedings of a court having jurisdiction does not justify a resort to the extraordinary remedy of prohibition, and that a writ of prohibition never issues to restrain a lower tribunal from committing mere error in deciding a question properly before it; or, as it has sometimes been said, the writ of prohibition cannot be converted into, or made to serve the purpose of, an appeal, writ of error, or writ of review to undo what already has been done. This is true both because there has been no usurpation or abuse of power and because there exist other adequate remedies. Thus, when jurisdiction is clear, an erroneous decision in ruling on the sufficiency of the petition or complaint, or on a motion to dismiss, or on matters of defense, or in rendering judgment, is not ground for a writ of prohibition." (42 Am.Jur. 165, 166; see Lord v. Superior Court, 27 Cal.2d 855 [168 P.2d 14]; Howard v. Superior Court, 25 Cal.2d 784 [154 P.2d 849]; Imperial Beverage Co. v. Superior Court, 24 Cal.2d 627 [150 P.2d 881]; Redlands etc. Sch. Dist. v. Superior Court, 20 Cal.2d 348 [125 P.2d 490]; Abelleira v. District Court of Appeal, 17 Cal.2d 280 [109 P.2d 942, 132 A.L.R. 715]; Fortenbury v. Superior Court, 16 Cal.2d 405 [106 P.2d 411]; Van Hoosear v. Railroad Commission, 189 Cal. 228 [207 P. 903]; 21 Cal.Jur., Prohibition,  4, 9, 10.)
 In the Redlands School District case, certiorari was denied, the court holding: "Where, as here, the statute does not restrict the power of the court but merely sets up a condition precedent to the establishment of the plaintiff's cause of action, we think the violation of the statutory provision constitutes an error of law rather than excess of jurisdiction." (20 Cal.2d 360.) The court held in Imperial Beverage Co. v. Superior Court, supra, that although a trial court may have erred in granting a second motion to stay proceedings, based on the same state of facts as the first motion, the second order was valid, until revoked, and was not in excess of the jurisdiction of the court. And in Howard v. Superior Court, supra, in a proceeding to review an order of the probate court vacating an allowance of attorney's fees, it was held that the alleged lack of a sufficient affidavit of merits, inadequacy of the showing of mistake, and insufficiency of proposed objections to the allowance of fees, did not affect the court's jurisdiction to act on the motions, but merely indicated the possibility of error in the exercise of jurisdiction. Assuming that the court should have decided that the mistake was due to a *765 negligent failure to ascertain the facts, this court decided, the error could be reviewed only on appeal.
 In the present proceeding, the trial court has not finally ruled upon the issue as to whether the state, as a sovereign entity, may be subjected to liability for the alleged tort, and, in my opinion, that court retains jurisdiction to rule upon the question. If it rules erroneously, the error may be corrected upon appeal. But an extraordinary writ should not lie, in the usual case, to make certain that a trial court will apply corect legal principles, and to allow prohibition would afford the petitioner a means of appealing from an order overruling a demurrer. Furthermore, by overruling the demurrer, the trial court has indicated that it would rule in accordance with the holding of the majority opinion upon the issue of tort liability. But assuming that the trial court would commit error and decline to subject the state to liability, as stated in Ballentine v. Superior Court, 26 Cal.2d 254, 260 [158 P.2d 14], "We cannot presume, on prohibition, that the trial court will commit error. Since there is a lawful way in which the court can proceed it would be improper to assume that it intends to proceed unlawfully. Prohibition is not available in such circumstances." (See Lord v. Superior Court, supra, p. 858.)
 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." (Abelleira v. District Court of Appeal, supra, p. 291.) The cases cited in the majority opinion for the proposition that prohibition is the proper remedy are distinguishable upon the grounds that, in each of them, the court's power was limited by the federal Constitution and the question of whether the defense of sovereign immunity from suits presents a jurisdictional question, in the sense that such suits may be halted by prohibition as that remedy has been restricted by statute, was not involved.
 For these reasons, in my opinion, prohibition is not a proper remedy. *766
