
30 Cal.3d 528 (1982)
638 P.2d 1299
179 Cal. Rptr. 902
ROMAN CETENKO, Plaintiff and Respondent,
v.
UNITED CALIFORNIA BANK et al., Defendants and Respondents; ARLENE SCHAEFER, Claimant and Appellant.
Docket No. S.F. 24275.
Supreme Court of California.
January 18, 1982.
*529 COUNSEL
Dennis F. Beltram and James P. Carroll for Claimant and Appellant.
*530 Francis Schwartz and C.M. Gilman for Plaintiff and Respondent.
No appearance for Defendants and Respondents.
OPINION
MOSK, J.
The sole question for our determination in this case is whether a prior lien on a judgment in favor of an attorney for legal fees takes precedence over a subsequent judgment creditor's lien perfected in accordance with the provisions of section 688.1 of the Code of Civil Procedure.[1] The trial court held that the attorney's lien prevails, and we agree with that determination.
In November 1976, Francis Schwartz, an attorney, and Dr. Roman W. Cetenko, his client, entered into a written agreement which provided that Schwartz would represent Cetenko in an action to establish ownership of a parcel of real property, and that Cetenko would pay Schwartz a stated hourly rate for his services, plus costs. The agreement provided further that most of the fee would be deferred and that fees owed by Cetenko would become a lien upon any recovery in the action.[2]
Arlene Schaefer had loaned $8,000 to Cetenko in 1976, secured by a promissory note. Upon his failure to repay the loan, she filed suit and, in March 1977, recovered a judgment in that sum against him. In July 1979, upon stipulation of Cetenko, she was granted a lien by the trial *531 court pursuant to section 688.1, on the proceeds of any judgment which he would recover in the action filed by Schwartz on his behalf.
Cetenko recovered $31,848.28 in the action; the defendant deposited that sum in court, and in October 1979, Schwartz filed a motion seeking release of the entire proceeds to him as payment for services rendered in this and several other matters. In support of the motion, he submitted a copy of a statement to Cetenko for $47,683.73 for various legal services and costs, and a declaration that the judgment was the only source from which the fees could be satisfied because Cetenko had represented that he was unable to pay the fees. The trial court granted Schwartz's motion, but ordered that he deposit the amount Cetenko owed to Schaefer in a bank account, from which withdrawals could only be made with the joint consent of Schwartz and Schaefer's attorney. Schaefer appeals from that order.
Section 2881 of the Civil Code declares that a lien may be created by contract, and section 2883 provides that an agreement may provide for a lien to be created as security for property to be acquired in the future. Section 2897 of the Civil Codes states, "[o]ther things being equal, different liens upon the same property have priority according to the time of their creation." Our inquiry, therefore, is whether the contract between Schwartz and Cetenko resulted in creation of a valid lien on the proceeds of the judgment and, if so, whether that lien has priority over the lien of Schaefer, by virtue of section 2897.
(1) A lien in favor of an attorney upon the proceeds of a prospective judgment in favor of his client for legal services rendered has been recognized in numerous cases. Such a lien may be created either by express contract, as in the present case (Haupt v. Charlie's Kosher Market (1941) 17 Cal.2d 843, 846 [112 P.2d 627]; Tracy v. Ringole (1927) 87 Cal. App. 549, 551 [262 P. 73]; see Isrin v. Superior Court (1965) 63 Cal.2d 153, 157 [45 Cal. Rptr. 320, 403 P.2d 728]), or it may be implied if the retainer agreement between the lawyer and client indicates that the former is to look to the judgment for payment of his fee (Bartlett v. Pacific Nat. Bank (1952) 110 Cal. App.2d 683, 689 [244 P.2d 91]; Wagner v. Sariotti (1943) 56 Cal. App.2d 693, 697-698 [133 P.2d 430]).
(2) Schaefer claims that Schwartz does not have a valid lien, despite the agreement that any judgment in Cetenko's favor would be subject to a lien for fees. Relying on the fact that the cases cited by Schwartz *532 which have recognized an attorney's lien on a future judgment involve contracts for contingency fees, Schaefer claims that a lien on a judgment to secure the payment of hourly fees is invalid. She does not assert here that Schwartz's hourly charge was excessive or that he misrepresented the number of hours on which his fees were based, nor did she present such a challenge to the trial court. Rather, she argues that a contract for an hourly fee which is to constitute a lien on the judgment is unconscionable as a matter of law because the fee and the costs may consume the entire amount of the judgment recovered, whereas in the case of a contingency fee contract, only a portion of the judgment is paid to the attorney as his fee.
She cites no authority for this proposition. The fairness of the fee agreement and the lien to secure it must be viewed as of the time the arrangement was made. We discern nothing inherently unfair in an agreement to pay an attorney an hourly fee for his services. Indeed, in many instances it may be more advantageous to a client than a contract for a contingency fee. If the attorney succeeds in obtaining a judgment in the client's favor with a relatively modest expenditure of time, the client will retain a higher percentage of his recovery than would be the case with a contingency fee contract, which would require the payment of a percentage of the recovery regardless of the amount of the attorney's time expended. The fact that, as events turned out in the present case, the judgment was not as substantial as anticipated and proved to be insufficient to pay Schwartz's fees does not render the contract unconscionable at the time the agreement was made. Since the fee agreement was not invalid as unconscionable, it follows that the arrangement to secure payment of the fee by the imposition of a lien on the judgment cannot be challenged on that ground.[3]
A further reason advanced by Schaefer for invalidity of the lien is that it "smacks of a `secret lien'" (see Smitton v. McCullough (1920) 182 Cal. 530 [189 P. 686]), which is disfavored.[4] We know of no authority, *533 case law or statute, which compels an attorney to give notice to a client's creditors of a contractual lien on the judgment. In other jurisdictions where the matter has been considered, it has been held that the filing of a notice of lien by the attorney is not necessary to protect his security interest against a creditor who levies on the judgment (Barnes v. Verry (1923) 154 Minn. 252 [191 N.W. 589, 590, 31 A.L.R. 707]) or an assignee of the judgment (Bent v. Lipscomb (1898) 45 W. Va. 183 [31 S.E. 907, 908]). Moreover, Schaefer had actual notice of the lien because, in December 1978, several months before she was granted a lien pursunt to section 688.1, Schwartz, in an excess of caution, filed a "Notice of Attorneys Lien" in the action.[5]
Another assertion of Schaefer is that the only manner in which a lien on a judgment may be created is by compliance with section 688.1, and that since Schwartz did not comply with the section, he cannot have recourse to Cetenko's recovery. This contention is patently without merit. The section by its terms relates only to liens of judgment creditors. It does not purport to limit liens on a judgment to such creditors to the exclusion of those who have a contractual claim,[6] and the purpose of the section is unrelated to liens created by contract.[7] Moreover, section 2881, subdivision 1, of the Civil Code expressly provides for the creation of a lien by contract, and neither logic nor authority justifies the *534 conclusion that such liens do not apply to judgments. The ultimate result of acceptance of Schaefer's contention would be to invalidate not only hourly fee arrangements but also contingency fee contracts which call for a lien on the judgment for legal services.
(3) Nor is there merit in Schaefer's assertion that, even assuming Schwartz was not required to comply with section 688.1 in order to resort to the proceeds of the judgment, nevertheless he cannot prevail because a lien acquired pursuant to a statute has priority over a contractual lien. It was long ago recognized in this state that in the circumstances of a lien created by contract and another created by statute, the text of the statute controls. (First Nat. Bank v. Silva (1927) 200 Cal. 494, 495-496 [254 P. 262].) Section 688.1 contains no language relating to the priority of liens obtained in compliance with its terms.[8] Thus, we are relegated to the rule of priority set forth in section 2897 of the Civil Code, and since Schwartz's lien was created at the time he entered into the contract with Cetenko, several years before Schaefer was granted a lien under section 688.1, the prior lien prevails.
Haupt v. Charlie's Kosher Market, supra, 17 Cal.2d 843, is directly in point. That case involved the question of priority between an attorney's contractual lien for fees against a judgment, and the lien of a creditor by attachment. An attorney entered into a contingent fee contract with his client, providing for a fee of one-third of any funds recovered in the action, and a lien in that amount upon the judgment. This court held that the attorney's lien was created at the time of the contract, and had priority over attachments levied on the verdict and judgment by a creditor of the client. The reason for affording the attorney's lien priority was that it was first in time, and "an attachment lien reaches only the interest of the debtor in the attached property and is therefore subject to prior equities against the debtor." (17 Cal.2d at p. 846.) This holding is consistent with the few cases from other jurisdictions which have considered the question. (Hanna Paint Mfg. Co. v. Rodey, Dickason, Sloan, Akin & Robb (10th Cir.1962) 298 F.2d 371, 373; Barnes v. Verry, supra, 191 N.W. 589, 590; Chattanooga Sewer Pipe Works v. Dumler (1929) 153 Miss. 276 [120 So. 450, 452-453, 62 *535 A.L.R. 999].) We discern no reason why the rule stated in Haupt should not apply in the present case.[9]
None of the cases relied upon by Schaefer for the proposition that a section 688.1 lien prevails over a prior contractual lien as a matter of law supports that proposition. In Del Conte Masonry Co. v. Lewis (1971) 16 Cal. App.3d 678 [94 Cal. Rptr. 439], a trial court's determination that a judgment creditor's lien obtained in compliance with section 688.1 had priority over the contractual lien of an attorney for services performed in the action was upheld by the appellate court on the ground that the equities of the claimants were not equal. The contract between the plaintiff-debtor and the attorney to grant the attorney a lien on the judgment was not made until after the judgment creditor gave notice that it intended to move the court for a lien under section 688.1. Salaman v. Bolt (1977) 74 Cal. App.3d 907 [141 Cal. Rptr. 841], upon which Schaefer also relies, concerned the question of priority between a section 688.1 lien obtained by an attorney, and an equitable offset. It was held that as between a statutory lien and an equitable offset, the offset is given preference.
Schaefer asserts that if an attorney's lien for fees is given priority over the claims of creditors, there is a danger of collusion between the attorney and the client to defraud creditors. She suggests that an inflated hourly fee could be agreed upon between an attorney and a heavily indebted client, and that the attorney could agree to return a part of the fee to the client after the action has been concluded in the client's favor. Needless to say, the courts are not powerless to deal with such unethical conduct. There is no evidence in the instant case suggesting the attorney-client contractual arrangement was anything other than bona fide.
Public policy favors the conclusion we reach in this case. If an attorney's claim for a lien on the judgment based on a contract for fees *536 earned prior to and in the action cannot prevail over the lien of a subsequent judgment creditor, persons with meritorious claims might well be deprived of legal representation because of their inability to pay legal fees or to assure that such fees will be paid out of the sum recovered in the latest lawsuit. Such a result would be detrimental not only to prospective litigants, but to their creditors as well. It must be observed that Dr. Cetenko, the client, makes no objection to the use of his judgment to partially satisfy his attorney's several claims. The only objection comes from a stranger to the proceedings, one whose judgment lien was obtained long after the attorney's lien was agreed upon by contract.
The order is affirmed.
Bird, C.J., Richardson, J., Newman, J., Kaus, J., Broussard, J., and Tobriner, J.,[*] concurred.
NOTES
[1]  Section 688.1, subdivision (a), provides in part: "... [U]pon motion of a judgment creditor of any party in an action or special proceeding made in the court in which the action or proceeding is pending upon written notice to all parties, the court or judge thereof may, in his discretion, order that the judgment creditor be granted a lien upon the cause of action, and upon any judgment subsequently procured in such action or proceeding, and, during the pendency of such action, may permit such judgment creditor to intervene therein. Such judgment creditor shall have a lien to the extent of his judgment upon all moneys recovered by his judgment debtor in such action or proceeding and no compromise, settlement or satisfaction shall be entered into by or on behalf of such debtor without the consent of such judgment creditor, unless his lien is sooner satisfied or discharged. The clerk or judge of the court shall endorse upon the judgment recovered in such action or proceeding a statement of the existence of the lien, the date of the entry of the order creating the lien, and the place where entered, and any abstract issued upon the judgment shall contain ... a statement of the lien in favor of such judgment creditor."

All references are to the Code of Civil Procedure, unless otherwise noted.
[2]  The agreement was later amended in respects not relevant to the issue before us.
[3]  Schaefer relies on a case which states that 70 percent of the amount of an award as a contingency fee is excessive (Jackson v. Campbell (1932) 215 Cal. 103 [8 P.2d 845]), and she asserts that, therefore, "100% of the judgment award is blatantly excessive." The agreement between Schwartz and Cetenko was not for payment of the entire amount of the award, but for an hourly fee, which was to be paid regardless of the amount of the judgment. The parties had apparently anticipated a huge monetary award to Cetenko in the judgment.
[4]  In Smitton, a subsequent equitable lien created by operation of law was held to have priority over a previously created lien of the same kind because the holder of the later lien had first given notice to the person who had in his possession the property which was the subject of the liens. The holding was based in part on the rule that if funds in the hands of a third person are assigned, notice to the holder of the fund is necessary to render the assignment valid against subsequent assignees without notice and for a valuable consideration. The court held that the "policy of the law is against upholding secret liens and charges to the injury of innocent subsequent purchasers and encumbrances." (182 Cal. at p. 538.)
[5]  The notice stated that, pursuant to the contract between Schwartz and Cetenko, a financing statement, as provided by the Uniform Commercial Code, was filed with the Secretary of State. Schaefer challenges the applicability of the Uniform Commercial Code to the contract for Schwartz's services. We need not consider her contentions in this regard since, as we conclude above, the "Notice of Attorneys Lien" was superfluous in any event.
[6]  Roseburg Loggers, Inc. v. U.S. Plywood-Champion Papers, Inc. (1975) 14 Cal.3d 742 [122 Cal. Rptr. 567, 537 P.2d 399], is inapposite. In that case, the Director of Human Resources Development was in effect deemed by statute to be a judgment creditor, and we recognized that section 688.1 provides the exclusive procedure by which a judgment creditor may satisfy his lien against a judgment. Here, Schwartz is not such a creditor, but claims a lien by virtue of his agreement with Cetenko.
[7]  Roseburg points out that the purpose of section 688.1 is to allow a judgment creditor to seek recovery of his claim from the proceeds of a judgment without permitting him to levy and sell the cause of action itself, a procedure which was deemed unfair to judgment debtors but which was authorized by statute prior to the enactment of section 688.1. (14 Cal.3d at pp. 746-747.)
[8]  It may be noted that, as among judgment creditors, the rule of priority stated in section 2897 of the Civil Code has been held to apply, so that the lien first created prevails, other things being equal. (Takehara v. H.C. Muddox Co. (1972) 8 Cal.3d 168, 172-173 [104 Cal. Rptr. 345, 501 P.2d 913].)
[9]  Schaefer seeks to distinguish Haupt on the ground that section 688.1 had not been enacted at the time that case was decided. But this is a distinction without a difference if, as we conclude above, the section relates only to the liens of judgment creditors and does not affect the rights of those who have acquired their liens by virtue of a contract. Moreover, the fact that Haupt involved attachments asserted subsequent to the verdict, while section 688.1 allows a preverdict lien in favor of judgment creditors does not serve to distinguish Haupt from the present case. The gravamen of Haupt is that a contractual lien on a judgment for legal services rendered in the action prevails over later encumbrances because it is the lien first created. Whether the later encumbrances are effected by way of a section 688.1 lien or by way of attachment is irrelevant to that principle.
[*]   Retired Associate Justice of the Supreme Court sitting under assignment by the Chairperson of the Judicial Council.
