
19 Cal.2d 748 (1942)
THEODORE WEINER, Appellant
v.
J. B. ROOF et al., Defendants; CITIZENS NATIONAL TRUST & SAVINGS BANK (a National Banking Corporation), Respondent.
L. A. No. 17299. 
Supreme Court of California. In Bank.  
Mar. 5, 1942.
 I. Gralla and Henry O. Wackerbarth for Appellant.
 Chandler & Wright, John F. Gilbert and Oliver S. Northcote for Respondent.
 TRAYNOR, J.
 Joseph P. Connolly owned an 80-acre tract of unimproved land in Los Angeles, which he contracted to sell in 1927 to J. B. Roof, Incorporated, for $5,500 an acre plus one half the profits to be realized from the subdivision of the property and sale of the lots. To carry out the sale Connolly and J. B. Roof, Inc., set up a subdivision trust with the Farmers and Merchants National Bank of Los Angeles as trustee. Under the terms of the trust, J. B. Roof, Inc., was to subdivide the tract, construct street improvements at its own *750 expense, and sell the lots. The trustee was to execute the contracts of sale, make collections from the purchasers of the lots, pay to Connolly from these funds the amount owed him by J. B. Roof, Inc., for the land, and distribute the remainder to J. B. Roof, Inc. In 1929 the Farmers and Merchants National Bank assigned all its rights as trustee under the trust, including all previous contracts of purchase, to the Citizens National Trust and Savings Bank, and a new trust agreement was entered into between Connolly, J. B. Roof, Inc., and the Citizens Bank. Under the terms of this agreement the Citizens Bank, as trustee, held legal title to the property and made collections from the purchasers of the lots. From funds thus collected the trustee could reimburse itself for advances to the trust. As the funds were received, a portion was allocated to certain accounts for the payment of trust expenses, including fees and commissions of the trustee. Another portion was allocated to an account for payment of improvements. Connolly then received payment on the amount owed him by J. B. Roof, Inc., as purchase price of the land, including half the profits, and the remainder was paid to J. B. Roof, Inc. The trust recited that Connolly was indebted to the Citizens Bank in the sum of $225,000 and authorized the bank to apply Connolly's share of the collections as they were received toward payment of this debt. The payments thus received by the bank were treated as payments to Connolly of his share of the proceeds.
 In 1927, the plaintiff, Theodore Weiner, was induced by J. B. Roof, Inc., to contract to purchase a lot for $3,500, and he began making payments to the trustee. Certain representations made by J. B. Roof, Inc., proved false. These representations were not included in the written contract, which contained a clause limiting the responsibility of the seller to representations therein set forth. In 1932 plaintiff gave notice of rescission and brought suit against J. B. Roof, J. B. Roof, Inc., and the Citizens Bank to rescind the contract of purchase because of fraud and to recover the money he had paid on the purchase price of the lot. He recovered a judgment against J. B. Roof and J. B. Roof, Inc., for $3,807.01 and against the bank for $1,890, the latter amount representing payments plaintiff made to the bank after it became trustee. The bank alone appealed from the judgment. On that appeal this court held that under the principle of Speck v. Wylie, 1 *751 Cal.2d 625 [36 PaCal.2d 618, 95 A.L.R. 760], plaintiff could recover payments made to the bank, but only to the extent that the bank was unjustly enriched thereby. The court stated that "appellant, as trustee of the money paid to it by respondent, should be afforded the opportunity of showing, as it asserts it can, that it has paid over to the beneficial owner the money for which judgment has been taken against it. Such a showing, if made, will disclose that the appellant, an innocent party to the fraud, has not been unjustly enriched and will preclude the entry of a monetary judgment against it under the rule mentioned." The judgment was reversed as to the bank, with the following instructions: "That portion of the judgment awarding plaintiff $1,890 as against the appellant Citizens National Trust and Savings Bank, as trustee, is reversed, with directions to the court below to permit said appellant if it be so inclined, to offer evidence as to the disposition of the money paid to it by the respondent." (Weiner v. Roof, 10 Cal.2d 450 [74 PaCal.2d 736].)
 The evidence at the second trial was therefore confined to the disposition made by the bank of the money paid to it by plaintiff. The bank, by its accounts and the testimony of one of its officers, showed that in accordance with the terms of the trust it had disbursed the $1,890 received from plaintiff as follows: $1,157.46 was credited to itself toward the payment of Connolly's indebtedness; $346.75 was credited to the general trust account, from which the general expenses of the trust were paid, and $385.79 was credited to the improvement account, from which the cost of street improvements to the tract were paid. The bank showed that at the time of plaintiff's rescission the trust had paid out not only the funds in the various trust accounts but over $7,000 more advanced to it by the bank. On the basis of this evidence, the trial court found that the trustee had paid to the beneficial owners all the money it received from plaintiff, and rendered judgment for the bank.
 [1] Plaintiff contends that the bank is liable for the money received by it because the money was never actually paid over to the beneficiaries. The bank, however, in making the collections from the purchasers of the lots in its capacity as trustee acted as agent on behalf of its principals, J. B. Roof, Inc., and Connolly. The same rule governs the liability of the bank in such a situation whether it is designated a *752 trustee or agent. (See Rest., Restitution, secs. 143 (a), (b), 190 (a); Rest., Agency, sec. 13; 1 Cal.Jur. 689, 690; 25 Cal.Jur. 121, 122; Weiner v. Roof, supra.) It is well settled that one who has paid money through fraud or mistake to an innocent agent, may recover the amount from the agent unless the latter has paid it to the principal, spent it on behalf of the principal, or paid it to a third party on behalf of the principal. (Rest., Restitution, sec. 143 (b); Rest., Agency, sec. 339 (f); Crocker-Woolworth Nat. Bank v. Nevada Bank, 139 Cal. 564 [73 P. 456]; Becsey v. California Title Ins. & Trust Co., 192 Cal. 632 [221 P. 356]; Craig v. Boone, 146 Cal. 718 [81 P. 22]; Weiner v. Roof, supra. See 2 C.J. 821-823.)
 [2] The fact that the agent credits the principal with the amount received does not release the agent from his obligation to make restitution so long as he continues to hold the money on behalf of the principal (Rest., Restitution, sec 143 (b); Rest., Agency, sec. 339 (f); see National Bank of Calif. v. Miner, 167 Cal. 532 [140 P. 27]; 2 C.J. 823); but when the agent parts with the money in accordance with the agency, he is released from liability. In the present case the mere crediting of $346.75 and $385.79 to the general account and the improvement account respectively could not release the bank from the obligation to withdraw these sums from the accounts and repay them to plaintiff, but having actually expended the money on behalf of the trust, the beneficial owners of which constitute its principal, it is no longer required to make restitution.
 [3a] Most of the money received by the bank from plaintiff, however, was applied on Connolly's indebtedness to it. It therefore still has that amount, not as trustee, but in its private capacity. [4] If an innocent agent receives money through mistake or fraud and pays it to a third party on behalf of his principal in payment of a debt owed the third party by the principal, the agent cannot be required to make restitution of the money. [5] If the third party has no notice of the claims of the original owner, he is a bona fide purchaser for value and may keep the amount as against the original owner, whose only remedy is against the principal on the grounds of fraud, mistake, or unjust enrichment. (Rest., Restitution, secs. 13, 172, 173(e); Rest., Trusts, sec. 304(2) (a); Frey v. Clifford, 44 Cal. 335, 342; Davis v. Russell, 52 Cal. 611 [28 Am. Rep. 647]; Foorman v. Wallace, 75 Cal. 552 [17 P. 680]; Virginia Timber & Lumber Co. v. Glenwood Lumber Co., 5 Cal. *753 App. 256 [90 P. 48]; Chapman v. Hughes, 134 Cal. 641, 658 [58 P. 298, 60 P. 974, 66 P. 982]. See Cal. Civ. Code, secs. 1796, 3106.) Extinguishment of the past indebtedness by the third party is considered a change of position sufficient to preclude a recovery from him even though it would be possible for him to give up the money and retain his original claim against the debtor. (See 21 Cal. L. Rev. 311 et seq; 45 Harv. L. Rev. 1333 et seq.; 33 Yale L. J. 628 et seq.; 2 Williston, Sales, (2d ed.) sec. 620.)
 [6] If the agent himself is the creditor of his principal, and with the latter's consent applies the money received toward the payment of the debt, he is likewise a bona fide purchaser for value and may retain the money as against the original owner. (Rest., Restitution, sec. 143(b); Rest., Agency, sec. 339(f); Bradley Lumber Co. v. Bradley County Bank, 206 Fed. 41 [124 C.C.A. 175]; White v. Rutherford, (Tex. Civ. App.) 148 S.W. 598; Winslow v. Anderson, 78 N. H. 478 [102 Atl. 310]; La Farge v. Kneeland, 7 Cow. (N.Y.) 456; Mowatt v. McLelan, (N.Y.) 1 Wend. 173; Langley v. Warner, 3 N.Y. 327; Cullen v. Donahue, 45 R. I. 237 [121 Atl. 392]; Holland v. Russell, (1861) 1 B. & S. 424, affmd. 4 B. & S. 14; Taylor v. Metropolitan Ry., (1906) 2 K. B. 55; Bessler Movable Stairway Co. v. Bank of Leakesville, 140 Miss. 537 [106 P. 445]; Hullet v. Cadick Milling Co., 90 Ind. App. 271 [168 N.E. 610]. See 21 Cal. L. Rev. 311, 324; 45 Harv. L. Rev. 1333, 1346; 2 C.J. 821-823.) The fact that the agent is the same person as the creditor and may keep the money himself in payment of the debt does not prejudice his right so long as the payment is authorized by the principal. The legal effect is the same as if the money were delivered by the agent to the principal and then redelivered by the principal to the agent in payment of the debt. Such formalism, however, is unnecessary. In the words of the Restatement of Restitution, (section 143, comment b): "Where an agent receives money on account of the principal, the agent may, by agreement with the principal, apply such money upon an indebtedness of the principal to him. In this case the agent becomes a bona fide purchaser of the money and is entitled to keep it although paid to him by mistake. ... The fact that upon making repayment to the payor, the fiduciary would himself be able to maintain an action against the beneficiary does not prevent the defense of change of position. This is true even though the beneficiary is available and has sufficient *754 assets to respond to a judgment for that amount; the remedy of the payor is against the beneficiary either directly or by subrogation." Thus in the present case the bank credited to itself, as authorized by the trust, some of the money received from plaintiff in payment of the indebtedness owed it by its principal. In its capacity as trustee it has paid out the money. In its private capacity it is a bona fide purchaser for value, entitled to retain the amount as against the plaintiff.
 There are decisions that require an innocent agent to make restitution of money received by fraud or mistake when he has applied the money toward the payment of a debt owed him by his principal. (Herlihy v. Independence State Bank, 261 N.Y. 309 [185 N.E. 393]; Alberta Pac. Grain Co. v. Dominion Bank, 55 Dom. L. R. 735; Nat'l Bank of Calif. v. Miner, supra.) These cases reason that the agent has not changed his position but has merely given the principal a credit, and that he may remove the credit upon giving up the money and retain his claim against the principal. The same argument would apply to any bona fide purchaser who has received money or property in payment of a past indebtedness from a debtor who procured it by fraud or mistake. [7] It is established in California, however, that a past indebtedness is sufficient value to justify the bona fide purchaser in retaining the money as against the original owner, and that the bona fide purchaser will not be left to his original claim against the debtor. (Frey v. Clifford, supra; Davis v. Russell, supra; Foorman v. Wallace, supra; Virginia Lumber Co. v. Glenwood Lumber Co., supra; Chapman v. Hughes, supra.) The decisions cited above requiring restitution are derived from the rule that an agent is required to restore money paid to him through mistake or fraud when he has credited his principal with the amount but still retains it in his possession. They fail to distinguish between an agent who holds the money on behalf of his principal after crediting it to the principal's account and an agent who has received the money, with the consent of the principal, in payment of a debt owed to him by the principal. In the latter situation the agent is in the position of a bona fide purchaser for value; in the former he is not.
 [3b] In the present case the bank applied the money received from the plaintiff to the debt owed it by Connolly in accord with the terms of the trust and with Connolly's consent. It *755 had no knowledge of plaintiff's claim at the time it credited itself with the amount. In its capacity as agent it has therefore paid out plaintiff's money on behalf of its principal, and in its private capacity it is a bona fide purchaser for value, entitled to retain the money.
 This action is confined to the disposition made by the bank of the funds received by it from plaintiff. It is therefore irrelevant that the bank as trustee has subsequently received money for the trust from other purchasers of lots. Plaintiff has a judgment against J. B. Roof, Inc., one of the beneficiaries under the trust, and may subject the interest of J. B. Roof, Inc., in the trust to levy and sale under execution.
 The judgment is affirmed.
 Gibson, C.J., Shenk, J., Curtis, J., Edmonds, J., Houser, J., and Carter, J., concurred.
