Opinion
The owners of a parcel of bare land signed a long-term ground lease with a developer, who planned to improve the property with a commercial building. To facilitate that construction, the owners executed a deed of trust in favor of the developer’s construction lender. Ultimately, the developer defaulted on the construction loan and the assignee of the lender foreclosed on the owner’s fеe interest.
*564 The owners sued the developer, the lender, and the lender’s assignee for damages and other relief. As to the lender, their theories primarily relied upon their assertion that the deed of trust was, in substance, a surety agreement. Their action against the lender was dismissed when they declined to amend their complaint after a demurrer was sustained to each count alleged. The owners appeal from the order of dismissal and from the postjudgment order awarding attorney’s fees to the lender.
While we agree that the owners sufficiently pleaded that they were sureties rather than principal obligors, the owners did not ultimately demonstrate that the trial court erred in sustaining the demurrers and awarding attorney’s fees. Accordingly, we affirm.
Standards of Review
In evaluating an order sustaining a demurrer to a pleading, we give the pleading a reasonable interpretation by reading it as a whole and all of its parts in their context.
(Moore
v.
Regents of University of California
(1990)
When considering the legal effect of those facts, we disregard any erroneous or confusing labels employed by the plaintiff.
(Saunders
v.
Cariss
(1990)
The Allegations of the Complaint
The operative pleading is the first amended complaint, filed in April of 1996. It alleges the following facts.
Albert E. Mead and Barbara Duque Mead arе the trustees of the Albert E. Mead and Barbara Duque Mead Revocable Inter Vivos Trust. (The complaint refers to the individuals and the trust collectively as the “Meads.”) *565 The Meads bought an undeveloped parcel of property from Theodore B. Zwicker in 1988. Simultaneously, the Meads executed a 30-year ground lease to Cooley Executive Plaza E (Cooley), a limited partnership of which Zwicker was the general partner. The leаse required the Meads to “ ‘subordinate’ [their] interest in the Property to an anticipated construction lender’s deed of trust” by executing the deed of trust, but not the promissory note which the deed of trust would secure.
In 1989, Zwicker arranged for Sanwa Bank California to provide the construction financing. The construction loan agreement and the promissory note for $1,020,000 were signed solely by Cooley. However, the deed of trust securing the perfоrmance of the obligations of Cooley under the loan agreement and the promissory note was executed by both Cooley and the Meads, and encumbered both Cooley’s leasehold interest and the Meads’ fee interest in the property. The deed of trust identifies the Meads and Cooley jointly as “Trustor” and imposes a variety of obligations upon the Trustor. On the other hand, it provides that the Meads assumed “no personal liability for the performance of the obligations of Cooley under this Deed of Trust” and could not be held personally liable by Sanwa.
Cooley defaulted on its obligations under both the ground lease and the promissory note in 1993. In August of that year, Sanwa commenced nonjudicial foreclosure proceedings by recording a notice of default. The Meads urged Sanwa to either seek the appointment of a receiver or allow thе Meads to assume Cooley’s obligations. Sanwa assured the Meads that a receiver would be appointed. The Meads also filed an unlawful detainer action to remove Cooley from possession of the property. The action was dismissed in 1994, after Sanwa made the dismissal a condition of a forbearance agreement by which Sanwa agreed to postpone publication of its notice of sale.
In August of 1995, the last of numerous extensions of the maturity date of the promissory note expired, and the note became due. Sanwa started a new foreclosure proceeding, but assured the Meads that it would proceed only against Cooley’s leasehold interest. Sometime thereafter, Sanwa reversed itself and informed the Meads that it intended to foreclose on its security interest in the fee as well as the leasehold.
In December оf 1995, the Meads formally demanded that Sanwa exhaust all remedies against Cooley prior to exercising any right under the deed of trust against the Meads. In particular, they demanded that Sanwa terminate the pending foreclosure proceedings as to the Meads’ fee interest in the property.
Further allegations will be discussed in connection with individual counts.
*566 Procedural Background
Also in December of 1995, the Meads filed suit against Sanwa, Zwicker, and Cooley. A demurrer by Sanwa was sustained with leave to amend. Thereafter, the Meads filed their first amended complaint. As to Sanwa, it asserts claims for damages on the basis of: breach of fiduciary duty (first count); breach of the covenant of good faith and fair dealing (second count); fraud (third count); negligent misrepresentation (fourth count); waste (fifth count); rescission and restitution (sixth count); negligence (seventh count); and breach of written contract (eighth count).
Sаnwa again demurred: generally as to all counts, and specially as to the misrepresentation counts. The trial court sustained the demurrers to all counts, but granted leave to amend the third, fourth, fifth and sixth. When the Meads declined to amend, the complaint was dismissed and judgment was entered in favor of Sanwa.
Thereafter, Sanwa moved for attorney’s fees pursuant to Civil Code section 1717. Over the Meads’ opposition, the trial court granted the motion and awarded fees and costs in the sum of $45,870.29.
The Meads separately filed appeals from the order of dismissal and from the order granting the attorney’s fees. We consolidated the two appeals for decision.
Contentions
Generally, the Meads contend that they are sureties rather than principal obligors, and they were denied their statutory rights as sureties. 1 More specifically, they argue that each count of the complaint states sufficient facts to constitute a cause of action. In addition, they contend that they were deprived of a fair hearing below on the demurrer, and that the trial court erred in awarding attorney’s fees in any amount.
Discussion
A. The Complaint Sufficiently Alleges That the Meads Are Sureties.
“The suretyship relation . . . arises where two persons are under obligation to the same obligee, who is entitled to but one performance, as
*567
between the two who are bound, and one of them should ultimately bear the burden of the obligation. The obligor ultimately responsible for the debt is the principal and the other is the surety.”
(Everts
v.
Matteson
(1942)
A suretyship may result from different types of promises: “A surety . . . is one who promises to answer for the debt, default, or miscarriage of another, or hypothecates property as security therefor.” (Civ. Code, § 2787.) Those promises may be made in an express agreement or may be implied by law. (See, e.g.,
Braun
v.
Crew
(1920)
Because the parties focus primarily upon whether the Meads are sureties or principal obligors, we address that issue first. Have the Meads adequately pleaded the existence of a suretyship relationship between themselves and Sanwa?
The Meads repeatedly allege that they were the sureties of Cooley’s debt, not principal obligors. Sanwa dismisses those allegations on the ground that unsupported factual conclusions are disregarded when ruling on a demurrer.
(Moore
v.
Regents of University of California, supra,
Sanwa challenges the sufficiency of those factual allegations by arguing that they are contradicted and thus superseded by the terms of the deed of trust appended to the complaint, and that in any event the facts alleged by the Meads are insufficient as a matter of law to establish that they were only sureties. It is mistaken on both grounds.
1. The Recital in the Deed of Trust That the Meads Are Trustors Does Not Conflict With Allegations in the Body of the Complaint That They Are Sureties.
For purposes of a demurrer, we accept as true both facts alleged in the text of the complaint and facts appearing in exhibits attached to it. If the
*568
facts appearing in the attached exhibit contradict those expressly pleaded, those in the exhibit are given precedence.
(Dodd
v.
Citizens Bank of Costa Mesa
(1990)
It is mistaken. Because sureties include those who hypothecate their propеrty as security for the debt of another (Civ. Code, § 2787), the allegation in the text that they are sureties is not inconsistent with the allegation in the deed of trust that they are trustors.
Even if “trustor” and “surety” were inconsistent, the rule giving precedence to allegations in exhibits could not have had any application in this context. Civil Code section 2832 provides that “[o]ne who appears to be a principal, whether by the terms of a written instrument or otherwise, may show that he is in fact a surety, except as against persons who have acted on the faith of his apparent character of principal.” If written instruments attached to a pleading were always given precedence, then a supposed principal would be foreclosed from exercising the statutory right to prove that he or she was actually a surety.
2. The Meads Have Pleaded Sufficient Fact to Support Their Allegation That They Are Sureties Rather Than Principals.
Sanwa relies on
Matthews
v.
Hinton
(1965)
That analysis fails because Matthews was incorrectly decided.
Like the present case, Matthews arose from an agreement by property оwners and their long-term lessees to subordinate the owners’ reversionary interest in the fee to a construction loan. The owners did not sign the promissory note made by the lessees, but did execute a deed of trust along with the lessees. (234 Cal.App.2d at pp. 738-739.) The lessees defaulted on the note, and the lender foreclosed upon the property. Contending that they were only sureties, the owners sued the lender for damages for the wrongful sаle of the property. (Id., at p. 739.)
*569
The lender in
Matthews
moved for summary judgment, offering evidence that there was no agreement between itself and the owners except the deed of trust, and arguing that the deed of trust showed that the owners were principal obligors. (
The appellate court affirmed.
(Matthews, supra,
Citing Civil Code section 2832, the court acknowledged that the owners “had a right to show, if they could, that they were actually sureties even though they signed the trust deed as apparent principals.”
(Matthews, supra,
Thus, Matthews's conclusion that the owners failed to create a triable issue of fact regarding their relationship with the lender is premised upon its assertion that a creditor’s knowledge of the existence of a surety relationship between the two obligors does not tend to show the existence of a surety relationship between an obligor and the creditor. However, the California decisional law supporting that premise was statutorily overruled in 1939.
“The rule at common law [is] that a party apparently bound on a written contract as a principal may show by evidence aliunde that he signed the
*570
contract as a surety for the principal debtor, and, if such fact is known to the creditor, such party will be bound [to the creditor] as a surety only . . . .”
(Granger
v.
Harper
(1932)
In 1872, the Legislature codified the common law rule in the form of Civil Code section 2832, which at the time consisted of a single sentence: “ ‘One who appears to be a principal, whether by the terms of a written instrument or otherwise, may show that he is in fact a surety, except as against persons who have acted on the faith of his apparent character of principal.’ ”
(Granger
v.
Harper, supra,
Nevertheless, the Supreme Court continued to restrict the ability of an apparent principal to prove that he or she was actually a surety. It did so by first observing that it was possible for a person who has agreed with a creditor that he and a co-obligor will be liable to the creditоr as principals to at the same time agree with his co-obligor that, as between the two of them, the co-obligor would be primarily liable for the debt.
(Harlan
v.
Ely
(1880)
In 1939, the Legislature rejected that interpretation by amending Civil Code section 2832 to add a second sentence: “It is not necessary for him [i.e., the apparent principal who claims to be a surety] to show that the creditor accepted him as surety.” (Stats. 1939, ch. 453, § 28, p. 1799.) That *571 amendment therefore statutorily overruled Farmers’ Nat. Gold Bank v. Stover and its progeny, which said that the alleged surety must prove that the creditor agreed to treat him as a surety.
It also overruled
Harlan
v.
Ely
and its progeny, which held that proof of the creditor’s knowledge of the surety arrangement between the obligors was not enough because the creditor might have a contrary agreement. If the alleged surety need no longer affirmatively disprove the existence of a contrary agreement, then there is no reason why proof of the crеditor’s knowledge is not sufficient to allege a prima facie case. For instance, when a principal sells property securing a debt to a buyer who agrees to assume liability for the debt, the buyer becomes the principal and the seller is relegated to the status of a surety. After receiving notice of the assumption, the creditor
must
afford the former principal the rights of a surety.
(Everts
v.
Matteson, supra,
21 Cal.2d at pp. 447-448;
Westinghouse Credit Corp.
v.
Wolfer
(1970)
Despite the 1939 statutory amendment and its rejection of the rules stated in prior decisions such as
California Nat. Bank
v.
Ginty
and
Casey
v.
Gibbons,
those are exactly the outdated cases upon which
Matthews
relies for the proposition that an apparent principal must be held to be a principal rather than a surety even though the creditor knew that the obligors intended that person to be merely a surety. (See
Matthews, supra,
As the result of the 1939 amendment to Civil Code section 2832, California has fully adopted the common law rule described in
Granger
v.
Harper.
If a creditor knows that its obligors have agreed between themselves that one will be the principal and the other will be the surety, the latter is bound to the creditor as a surety only, even though he or she appears from the written instruments to be a principal. (
The Meads pleaded that they were sureties of Cooley. Sanwa’s knowledge of the fact that the Meads were hypothecating their property to *572 secure Cooley’s debt is demonstrated by the loan documents Sanwa prepared: the construction loan agreement and the note are signed by Coоley alone; the deed of trust identifies the secured obligation as being that of Cooley; and the deed of trust expressly provides that the Meads shall have no personal liability for that debt. The complaint also alleges that Sanwa’s officer considered the Meads to be third parties rather than principal obligors. These facts are sufficient to support their allegation that they are bound to Sanwa as sureties only.
By itself, hоwever, that allegation does not demonstrate that the trial court erred by sustaining the demurrers. As will be seen, while the Meads have sufficiently pleaded their status as sureties, they have not demonstrated that their complaint pleads sufficient facts to constitute a cause of action against Sanwa.
B.-D. *
Disposition
The judgment of dismissal and the postjudgment order awarding attorney’s fees are affirmed. Sanwa shall recover its costs on appeаl.
Richli, J., and Ward, J., concurred.
Appellants’ petition for review by the Supreme Court was denied May 13, 1998.
Notes
In their complaint, the Meads refer to themselves, not as sureties, but as guarantors. However, the distinction between guarantors and sureties was abolished in this state by the 1939 amendment to Civil Code section 2787.
(Bloom
v.
Bender
(1957)
Even under the common law, the general rules governing suretyship relationships can be varied by private agreements between the parties. (Rest.3d Suretyship and Guaranty, § 6.) In particular, as the Supreme Court noted long ago in
Harlan
v.
Ely,
it is possible for a surety to
*572
bargain away the rights of suretyship and agree with a creditor to be liable as a principal. (
See footnote, ante, page 561.
