This is an appeal from a judgment in favor of the defendants following the sustaining of a demurrer to the complaint without leave to amend. Accepting the allegations of the complaint as true, the facts therein stated are as follows:
The plaintiff was a sanitary district organized pursuant to law which owned, maintained, and operated certain sewage disposal facilities in the county of Monterey. The defendants were engineers who represented and held themselves out as
*72
specialists, skilled, qualified, and experts in the design and construction of sewage treatment plants, sewers and drainage systems. During the years 1953, 1954 and 1955 and prior thereto the defendants were retained by the plaintiff for a consideration to design and supervise the construction in the county of Monterey of certain sewage treatment and disposal installations, including an outfall line which discharged sewage from plaintiff’s plant in the city of Salinas into the Salinas River. In the latter half of the year 1955 the defendants recommended to plaintiff that said outfall line should be cleaned so as to increase its capacity to discharge sewage in said river and recommended the installation of additional manholes in said line to accomplish the cleaning operation. Relying upon said recommendation and the representations that defendants were specialists, skilled, qualified, and expert in the. construction of sewage disposal systems, plaintiff retained defendants for a consideration to design and supervise the construction of said additional manholes in said outfall line, and defendants did, in the latter part of .the year 1955, undertake to and did design and supervise the construction of 14 manholes in said line, including Manhole Number 12. The elevation of the sewage plant where the sewage entered the outfall line was 44 feet above sea level and the point of discharge of said line in the Salinas River was approximately 37 feet above sea level. The elevation above sea level of Manhole Number 12 was 43.02 feet. On December 24 and 25 of the year 1955, the elevation of the water in the Salinas River reached a point approximately 47 feet above sea level, causing sewage to back up in the outfall line and to be discharged from Manhole Number 12 to an adjacent field of celery owned by W. Ambrosini and Con Ferrasci. As a result of said discharge the field was inundated with sewage and the celery was destroyed. Ambrosini and Ferrasci filed an action in the county of Monterey against the plaintiff on the grounds of nuisance and inverse condemnation for damages for the destroyed crop of celery and recovered a judgment against plaintiff for $13,254.95. Said judgment is now final, having been affirmed by the District Court of Appeal on October 28, 1957 (
The question presented is whether or not the complaint states a cause of action for indemnity against the defendants. As heretofore noted the trial court sustained a demurrer to said complaint without leave to amend. A demurrer reaches only matters appearing on the face of the complaint and such matters as may be considered under the doctrine of judicial notice.
(Weil
v.
Barthel,
In order to place the question in its proper legal focus we must briefly review the law of this state with reference to contribution between joint tortfeasors, the exceptions to that rule, and the recognition of the fundamental distinction between the right to indemnity and the right to contribution. Prior to January 1, 1958, the law in California was the common-law rule that there was no right of contribution between joint tortfeasors.
(Dow
v.
Sunset Tel. & Tel. Co.,
The alleged cause of action in the present case arose prior to 1958; therefore the common law rule against contribution applies. The question presented, however, is whether or not the plaintiff has a cause of action for indemnity. Both parties concede in their arguments that under the facts pleaded in the complaint the plaintiff and defendants were joint tortfeasors, but they disagree as to whether or not the facts come within the exceptions to the general rule of noncontribution which allow indemnity as between joint tortfeasors.
*75
The exceptions to the general rule of noncontribution find their basis in the fundamental difference between contribution and indemnity. The right of contribution, where it exists, presupposes a common liability which is shared by the joint tortfeasors on a pro rata basis. (See Code Civ. Proc., §§ 875-880.) The right of indemnity, on the other hand, because of some special relationship existing between two tortfeasors shifts the entire loss upon the one bound to indemnify. (Prosser on Torts, 2d ed., § 46, p. 249.) The distinction is well stated in
Builders Supply Co.
v.
McCabe,
There are numerous eases from other jurisdictions which have allowed indemnity as between joint tortfeasors upon recognized exceptions to the general rule of noncontribution, such as that the parties were not
in pari delicto
as to each other, or that the negligence of one was primary, direct, or active, while that of the other was secondary, indirect, passive or con
*76
struetive. (See
In the School District case,
supra,
In the Ho Sing case,
supra,
In the De La Forest case,
supra,
The following language from the School District ease, on page 446, is pertinent: “The United States Supreme Court has recently met this problem. It allowed the third person .to recover from an employer where the employer, as in the instant case, breached its contract with the third person and an employee was injured. There was no express contract of indemnification between the third person and the employer. The case is
Weyerhaeuser Steamship Co.
v.
Nacirema Operating Co.,
The Ho Sing, School District, and De La Forest cases,
supra,
recognize the rule announced in
Peters
v.
City & County of San Francisco, supra,
Applying the rules announced in the foregoing cases to the facts alleged in the complaint in the present case we must conclude that a cause of action is stated. The complaint alleges in substance that the plaintiff engaged the defendants to do engineering work; that the defendants represented themselves to be specialists, skilled and expert in the work they were engaged to do; that plaintiff relied on these representations ; that the work was negligently done; and that such negligence caused the injury to Ambrosini and Ferrasci for which the plaintiff was obliged to pay damages upon a liability grounded in nuisance and inverse condemnation. The essence of the complaint is that the defendants created the condition which caused the injury. There is nothing on the face of the complaint to indicate that the plaintiff did in fact participate in the alleged omission which caused the injury. The gist of the complaint is the defendants’ breach of its obligation to perform the engineering work in the skillful, expert, and careful manner they had represented they were capable of doing and the plaintiff’s reliance on defendants’ judgment and knowledge in matters in which the latter were experts. Such an obligation carries with it an implied agreement to indemnify and to discharge forseeable damages resulting to the plaintiff from the defendants’ negligent performance. The nature and scope of the relationship between the plaintiff and the defendants; the obligations owing by one to *80 the other; the extent of the participation of the plaintiff in the affirmative acts of negligence; the physical connection of the plaintiff, if any, with the defendants’ acts of negligence by knowledge or acquiescence; or the failure of the plaintiff to perform some duty it may have undertaken by virtue of its agreement—are all questions of fact that should be left to the jury.
We are asked by the defendants, however, to go beyond the face of the complaint and to take judicial notice of the record in
Ambrosini
v.
Alisal Sanitary Dist.,
We are not only confronted with the rule that res judicata may not be raised by demurrer
(King
v.
Mortimer,
*82
The contention is also urged that the plaintiff is barred from recovery because the liability imposed by way of inverse condemnation cannot be shifted by a public agency to a contractor. Such a position ignores the fact that the judgment rendered in
Ambrosini
was allegedly rendered also on a cause of action for nuisance. Defendants rely on the rule applicable to inverse condemnation eases to the effect that where a public agency contracts for the doing of construction work according to plans and specifications, theretofore adopted, and the contractor performs the work with proper care and skill and in accordance with the plans and specifications, but the work thus planned and specified results in an injury to adjacent property, the liability, if any there is, for the payment of damages, is upon the public agency under its obligation to compensate the damages resulting from the exercise of its governmental power.
(Steiger
v.
City of San Diego,
The judgment is reversed.
Bray, P. J., and Duniway, J., concurred.
A petition for a rehearing was denied May 13,1960.
Notes
Assigned by Chairman of Judicial Council.
