
18 Cal.App.2d 47 (1936)
KINGS LABORATORIES, INC. (a Corporation), Appellant,
v.
YUCAIPA VALLEY FRUIT COMPANY (a Corporation) et al., Respondents.
Civ. No. 1599. 
California Court of Appeals. Fourth Appellate District.  
December 7, 1936.
 Karl F. King, Lester G. King, Byrne & Coughlin and Martin J. Coughlin for Appellant.
 U. F. Lewis for Respondents. *48
 Barnard, P. J.
 The plaintiff, a public warehouse company engaged in the business of storing fruit, is a public utility subject to the regulation and control of the Railroad Commission of the state of California, and a rate of seven cents a box for the storage of fresh fruit had been authorized by that commission. In August, 1929, the plaintiff stored a quantity of fresh peaches for the defendant and, at the solicitation of the defendant, agreed to reduce its charge from seven cents to five cents per box. The peaches were removed early the next month and sold. The plaintiff brought this action to collect the amount of the storage charges and the defendant filed what it calls a counterclaim, in fact a cross-complaint, seeking damages because of the deteriorated condition of the fruit. The trial court denied recovery to the plaintiff and entered judgment for $1500 in favor of the defendant. From this judgment the plaintiff has appealed.
 [1] The appellant's main contention is that the judgment in favor of the respondent cannot stand since its cause of action is based upon an illegal contract. The alleged illegality consists in the fact that the reduction in the charge for storage, solicited by the respondent and given by the appellant, was in violation of the provisions of the Food Warehouseman Act. (Stats. 1919, p. 314.) The first three sections of this act are such as to bring the appellant within its terms. Sections 4 and 5 make it unlawful for any food warehouseman to discriminate between those desiring to avail themselves of the storage facilities offered or to grant or allow any reduction or deduction in rates for storage without the approval of the Railroad Commission, and make it unlawful for any person, firm or corporation to solicit or receive or attempt to obtain any such reduction in established rates. Section 6 of this act provides that "Every contract, expressed or implied, made by any person, firm or corporation in violation of the provisions of section four or section five of this act, is declared to be illegal and to be utterly void and no recovery thereon shall be had."
 It is well settled that a recovery cannot be had by either party in reliance upon an illegal contract. (Union Collection Co. v. Buckman, 150 Cal. 159 [88 P. 708, 119 Am.St.Rep. 164, 11 Ann. Cas. 609, 9 L.R.A. (N. S.) 568]; Haruko *49 Takeuchi v. Schmuck, 206 Cal. 782 [276 P. 345]; McRae v. Heath, 60 Cal.App. 64 [212 P. 228]; Von Kesler v. Baker, 131 Cal.App. 654 [21 PaCal.2d 1017].) The respondent contends that this rule has no application here for the reason that this is an action for damages for a tort and not for a breach of the contract.
 [2] Where a party must disclose an illegal contract to establish his case the action necessarily is contractual in nature. (Wise v. Radis, 74 Cal.App. 765 [242 P. 90].) In Rushing v. Pickwick Stages System, 113 Cal.App. 240 [298 P. 150], the court said:
 "In determining whether an action is on the contract or in tort the character of the action is to be determined by the nature of the grievance rather than by the form of the pleadings. (Ft. Smith & W. R. Co. v. Ford, 34 Okl. 575 [126 P. 745, 746, 41 L.R.A. (N. S.) 745]; 1 Cor. Jur., p. 1015.) 'If the complaint states a cause of action in tort and it appears that this is the gravamen of the complaint, the nature of the action is not changed by allegations in regard to the existence or breach of a contract.' (1 Cor. Jur., p. 1016.) We had occasion to consider this same question in Nathan v. Lock, 108 Cal.App. 158 [287 P. 550, 551, 291 P. 286], where we said 'Illustrations of the latter class of actions are those for damages arising out of the contract relations between bailor and bailee, carrier and passenger, master and servant, innkeeper and guest, etc. In such cases the tort which is the basis of the claim for damages lies in the breach of the duty imposed by law and the allegations of the contract relations between the parties are merely for the purpose of showing that the plaintiff was not a trespasser or that he was lawfully in the position or situation at the time the defendant's breach occurred."
 In Basler v. Sacramento etc. Ry. Co., 166 Cal. 33 [134 P. 993], a carrier and passenger action, the court said:
 "It is true that in many instances a person who has been injured may elect to sue either in tort or in contract, but this action is clearly based upon the injury and not upon the agreement of carriage, ... "
 In Chapman v. State, 104 Cal. 690 [38 P. 457, 43 Am.St.Rep. 158], where coal was lost as a result of negligence in keeping a wharf in good repair, in passing upon the claim that the action was in tort, the court said: "'But we *50 are clearly of the opinion that the cause of action alleged in the complaint is not of this character. It is not founded upon negligence constituting a tort, pure and simple, and unrelated to any contract, but is substantially an action for damages on account of the alleged breach of a contract.'" In Morse v. Steele, 149 Cal. 303 [86 P. 693], the complaint, after setting up a contract to care for animals and performance on the part of the plaintiff, alleged negligence in taking care of the animals and damage by reason thereof. A contention that the cause of action was in tort and not for breach of contract was held untenable. In Stark v. Wellman, 96 Cal. 400 [31 P. 259], damages were sought because a package was lost through the negligence of the defendant who had agreed to properly care for it. It was argued that this part of the action was in tort and the court said:
 "This contention cannot be sustained. It is true the owner of property injured by the tortious act of another may sue for the injury in tort, without noticing a contract with the wrongdoer of which the wrongful act is a violation. ... But there can be no question that he may sue for the breach of a contract, as was done in this case. The duty which the defendant is charged with having violated is expressly derived from the contract."
 [3] In its cross-complaint the respondent herein alleged that it "contracted with plaintiff for and plaintiff agreed to receive ... and to place promptly in cold storage ... and to keep safely in refrigeration at a proper degree of temperature to prevent decay and keep at a marketable condition", a quantity of peaches; that the respondent promised to pay five cents per month per box for such storage; that "relying upon the covenants and agreements so made" the respondent delivered certain boxes of peaches to the appellant upon its platform; that the appellant did not promptly place said fruit in its cold storage rooms, did not place the fruit in cold storage rooms in such a manner that there would be a proper circulation of cold air around and through the same, and did not so manage its refrigeration plant as to maintain a proper and uniform degree of temperature necessary to keep said fruit in a marketable condition; that said failure to maintain a sufficient temperature was caused by the gross negligence of the appellant in failing to store *51 the fruit in proper time and in proper manner and in failing to give proper attention to the operation of its system; that the respondent performed each and all of the terms of its agreement upon its part to be performed except that it had refused to pay for the storage of the fruit; and that by reason of the appellant's failure to promptly place the fruit in cold storage in such a manner that a proper circulation of cold air could be maintained around and about the same, and to properly operate its refrigeration system and equipment the fruit was damaged. The prayer is for a named amount and that the respondent be given judgment for the excess over any amount that might be awarded the appellant upon its claim for storage.
 The manager of the appellant company testified that officers of the respondent asked him to store these peaches as the market was glutted, their own warehouse was filled, and there would be a complete loss to the growers unless temporary arrangements for storage could be made; that he told them that the appellant was in no position to offer such storage as its machinery was being repaired and for the further reason that its plant was adapted solely to the storage of apples; that they urged him to help out the growers as the peaches would spoil; that after several conversations he told them he would do the best he could to accommodate the respondent and the growers; that they told him they could not pay the standard price of seven cents per box for storage but would pay five cents; and that he told them that since this was a matter of accommodation he would accept five cents per box. This evidence was not contradicted and respondent's manager testified that he went to the appellant's place of business to see if it was possible to secure storage as his own company did not have sufficient space, and that "I questioned whether he would be able to hold them in that small room. And he said if he could get his other machine going so that he could run both machines, he had a circulation, or rather, a return on the brine every 16 minutes, and he could just cool anything. So I didn't question him further." He further testified that the appellant agreed to keep the temperature at between 33 degrees and 35 degrees, and that in order to keep peaches in cold storage it is necessary to have a circulation of air by some mechanical means and some way to keep the air pure, in *52 addition to maintaining a temperature of 33 degrees to 35 degrees. A number of other witnesses testified that some means of forcing a circulation of air is absolutely essential in order to keep peaches in cold storage.
 It appears, without conflict, that the appellant's facilities were not intended for the storage of peaches and had never before been so used; that the respondent persuaded the appellant to take the peaches more or less as a community service; that the respondent knew that the facilities and equipment were not of a kind which all of the experts testified was essential in order to keep peaches from spoiling; that respondent's manager had doubts as to whether peaches could be kept in this warehouse on account of its lack of proper facilities, and that he relied on the statement of appellant's manager that he could "just cool anything".
 If it be assumed that an action in tort could have been maintained, we think it sufficiently appears, both from the cross-complaint and the evidence, that the respondent's action was based upon a breach of the contract rather than upon any breach of a general duty imposed upon the appellant by law. The respondent alleged the making of the contract, reliance upon it, its breach, and asked judgment for the difference between its damages and any amount due the appellant upon the contract. It relied upon a duty arising from a special contract under peculiar conditions, and the gravamen of the complaint is a breach of the contract to do three separate things which are said to have been necessary to keep the fruit in a marketable condition. The nature of the action is not changed by the allegation that the breach of the contract occurred by reason of the appellant's negligence. In our opinion this is "substantially an action for damages on account of the alleged breach of a contract", and the respondent, having relied upon and proved an illegal contract, may not prevail.
 The judgment is reversed, each party to pay their own costs on appeal.
 Marks, J., and Jennings, J., concurred.
