
97 Cal.App.2d 836 (1950)
ORIEN HAYWOOD ANDERSON, Respondent,
v.
JAMES A. DOOLITTLE, Appellant.
Civ. No. 17508. 
California Court of Appeals. Second Dist., Div. One.  
May 31, 1950.
 Herman Lewis Bennett for Appellant.
 Pacht, Warne, Ross & Bernhard and Rudolph Pacht for Respondent.
 DRAPEAU, J.
 This is an action to recover treble damages by reason of an alleged usurious transaction. (Cal. Const., art. XX,  22; Usury Law (Deering's Gen. Laws, 1944, Act 3757,  1-3.) Plaintiff sued out a writ of attachment. Her affidavit in support thereof averred that defendants were indebted to her upon an implied contract made or payable in this state for the direct payment of money. Defendant Doolittle denied the usury and appeals from the order denying his motion to discharge the attachment.
 Briefly, the complaint alleges that defendant Doolittle lent $5,500 to plaintiff, who executed and delivered her promissory note to him for $8,500, made payable to one De Rosner, the agent and nominee of said Doolittle. De Rosner assigned the note to Doolittle, who in turn assigned it to defendant Lambourne. That plaintiff within the year paid to defendants the sum of $3,404.93 as interest on said loan which was in excess of the legal rate.
 [1] It is here urged that the attachment was improperly issued because the action is based, not upon contract, "but upon a liability or penalty imposed by law."
 Subdivision 1 of section 537, Code of Civil Procedure, permits *837 the issuance of attachment "In an action upon a contract, express or implied, for the direct payment of money, where the contract is made or is payable in this State, and is not secured ..."
 "The attachment law is directed principally against debtors." 3 California Jurisprudence 410, section 8. And the Supreme Court of this state has held that an action for treble damages for usurious interest partakes of the nature of an action for debt: In Haines v. Commercial Mortgage Co., 200 Cal. 609, 619 [254 P. 956, 255 P. 805, 53 A.L.R. 725] the following appears: "While the provision for a special right of action in plaintiff for treble the amount of interest paid is in the nature of a penalty, the context of the act gives it more of the rating of an action for debt and therefore subject to offsets and counterclaims by defendants." Again in Scott v. Hollingsworth, 215 Cal. 314, 316 [9 P.2d 836], it was said: "It is true that the causes of action counted on partake both of the nature of penalties and of debts. They are penalties because meant to punish and deter the usurer. They are debts in that they may be treated as such with respect to set-offs and counterclaims and actions in equity between the parties respecting the transaction. (Haines v. Commercial Mortgage Co., supra [200 Cal. 609]; Esposti v. Rivers Bros., 207 Cal. 570 [279 P. 423].)"
 A case of more recent vintage is that of Nutzel v. Kozdron, 64 Cal.App.2d 908, 910 [149 P.2d 411], wherein an appeal was taken from an order vacating an attachment. The affidavit on attachment averred that plaintiff's cause of action against defendants arose from the fact that defendants had forcibly robbed plaintiff of $9,200 on a certain date. In reversing the order it was held:
 "(1) An attachment lies in all cases of an implied contract for the payment of money when the defendant is a nonresident of this state. (Code Civ. Proc.,  537, subd. 2.)"
 "(2) If a defendant steals money from a plaintiff, an implied contract to repay the money arises. (Los Angeles Drug Co. v. Superior Court, 8 Cal.2d 71, 74 [63 P.2d 1124]; Philpott v. Superior Court, 1 Cal.2d 512, 521 et seq. [36 P.2d 635, 95 A.L.R. 990]; Armstrong v. Kubo & Co., 88 Cal.App. 331, 335 et seq. [263 P. 365].)"
 It is elementary that "implied contract has its foundation in the doctrine of unjust enrichment. 26 American Law Reports 562. *838"
 Applying the foregoing principles, it would appear that upon payment of the usurious interest by respondent, an implied contract that appellant would respond in treble damages arose in her favor. Therefore the attachment was proper.
 The order appealed from is affirmed.
 White, P. J., and Doran, J., concurred.
