
816 P.2d 532 (1991)
112 N.M. 463
James A. THOMPSON, Plaintiff-Appellant,
v.
MONTGOMERY & ANDREWS, P.A., and Western Farm Bureau Mutual Ins. co., a corporation, Defendants-Appellees.
No. 11356.
Court of Appeals of New Mexico.
July 9, 1991.
Certiorari Denied August 14, 1991.
*533 Chris Lucero Jr., Albuquerque, for plaintiff-appellant.
Victor R. Ortega and Deborah J. Van Vleck, Montgomery & Andrews, P.A., Albuquerque, for defendants-appellees.

OPINION
BIVINS, Judge.
Attorney James A. Thompson appeals from a judgment dismissing his complaint for failure to state a claim upon which relief can be granted. He raises two issues: (1) that the district court erred in ruling that Thompson did not have an enforceable charging lien; and (2) that the district court erred in refusing to allow Thompson to amend his complaint to state alternative causes of action. We hold that the district court correctly ruled Thompson had no enforceable attorney's charging lien and, because we determine no cause of action exists against these defendants under any state of facts provable under the complaint, that dismissal with prejudice was appropriate. Therefore, we affirm.
Because dismissal was ordered under SCRA 1986, 1-012(B)(6), failure to state a claim upon which relief can be granted, we accept as true all well pleaded facts. Balizer v. Shaver, 82 N.M. 347, 481 P.2d 709 (Ct.App. 1971). A Rule 12(B)(6) motion tests the legal sufficiency of the complaint, not the facts that support it. Three Rivers Land Co. v. Maddoux, 98 N.M. 690, 652 P.2d 240 (1982) overruled on other grounds, Universal Life Church v. Coxon, 105 N.M. 57, 728 P.2d 467 (1986).
Thompson's complaint against Montgomery & Andrews, a law firm, and Western Farm Bureau Mutual Insurance Company (Western Farm Bureau) seeks damages for attorney fees and costs Thompson claims are due him for representing a client in an independent lawsuit. He also asks for punitive damages and other relief.
In his complaint, Thompson alleges that he was hired by Camille DeFillippo and her husband to represent them against a Mary Payne in a personal injury claim arising out of an automobile accident. Payne was insured with Western Farm Bureau, which engaged Montgomery & Andrews to defend the DeFillippos' action. Thompson filed suit on behalf of the DeFillippos against Payne in Sandoval County. He alleges that on November 3, 1987, the DeFillippos asked Thompson to cease representing them and to turn their complete file over to another attorney. Thompson never filed a formal withdrawal in the Sandoval County action. Nevertheless, Thompson discontinued representing the clients who pursued their claim pro se. No other attorney appeared on behalf of the DeFillippos. During the time the DeFillippos were representing themselves, Montgomery & Andrews negotiated a settlement on behalf of Payne and Western Farm Bureau, and the Sandoval County court dismissed that action with prejudice on September 6, 1988.
When Thompson learned of the settlement by his former clients and Payne, he filed this action in the district court of Bernalillo County claiming that the actions of defendants, in settling with the DeFillippos without securing payment of his fees and costs, constituted gross negligence and was otherwise "willful, wanton, malicious, reckless, oppressive * * * or fraudulent and in bad faith, and with utter disregard of [Thompson's] rights." In support of his claim of a charging lien for attorney fees of $5,750.00 and costs advanced in the amount of $869.94, Thompson attached to his complaint a letter he wrote to Montgomery & Andrews on September 18, 1987, which includes the following:
You also asked me to indicate the attorney's fees and costs I am claiming in *534 this case under my contingent fee agreement with Camille DeFillippo. They are as follows:


57.5 Hours at $100.00 per
hour:                            $5,750.00
Costs advanced in the preparation
of this case:                    $  869.94
_________
Total:                             $6,619.94

Thompson did not name his former clients, the DeFillippos, in the complaint and there is no indication that he had sought recovery of his claimed fees against them. Thompson does not make any claim that he ever filed a notice in the Sandoval County action claiming a charging lien or that he gave notice to his former clients that he was making such claim against the proceeds of any settlement or judgment. The sole basis for his claim of a charging lien is the letter attached to his complaint.
Unlike a number of other states, New Mexico does not have any statute protecting an attorney in the collection of fees earned or costs incurred on behalf of his clients. See Northern Pueblos Enters. v. Montgomery, 98 N.M. 47, 644 P.2d 1036 (1982). We therefore must look to the common law to determine the nature and extent of an attorney's right to protection in regard to his time, efforts and expenditures. As early as 1916, the supreme court of New Mexico had occasion to examine the origin, history, nature and extent of these rights.
Prichard v. Fulmer, 22 N.M. 134, 159 P. 39 (1916) involved a suit by an attorney against his former client who failed to pay him fees earned in the foreclosure of a mortgage on real estate which property the client bought at a foreclosure sale and then sold to a third party. In the suit to collect fees, the attorney also named the party who purchased the property from his client. The attorney sought judgment against his former client, and in the event of non-payment, that the resale of the real estate to the third party be set aside in order to assure payment of the attorney's claimed fees. The third party demurred to the complaint on the ground that it failed to state facts sufficient to constitute a cause of action, specifically asserting that the attorney, by his failure to assert his alleged lien for attorney's fees at and before the sale was confirmed and the deed executed and delivered to the former client, waived his alleged lien on the property. The district court agreed and the supreme court affirmed dismissal.
The supreme court took the opportunity to discuss at some length an attorney's common law lien for fees and costs. The opinion notes that the English courts, at an early date, recognized two types of attorney liens. One type gives the attorney the right to retain papers or other property that comes into his possession, or money that he has collected in the course of his professional employment, until all his costs and charges against his client have been paid. Id. at 139, 159 P. at 40. This was known as a "general" or "retaining lien," and at common law was founded on possession. We are not concerned with that type of lien in the case before us.
The second type of lien, known as a "charging lien," recognizes the right of an attorney to recover his fees and costs on behalf of his client from a fund recovered as the result of his efforts, and also the right to have the court interfere to prevent payment by the judgment debtor to the creditor in fraud of that right, and also to prevent or set aside assignments or settlements made in fraud of that right. Id. at 140, 159 P. at 40-41. It is this type of lien to which Thompson claims he is entitled.
Contrary to Thompson's contentions, however, he was not entitled to have the district court enforce his claim of a charging lien. First, Prichard makes clear that a charging lien does not usually attach until the recovery of judgment, and then does not prevent an honest settlement nor a payment to the attorney's client until the attorney has notified the debtor of his intention to claim a lien. Id. at 140, 159 P. at 40-41. Compare id. with Hanna Paint Mfg. Co. v. Rodey, Dickason, Sloan, Akin & Robb, 298 F.2d 371 (10th Cir.1962) (where successful motion for distribution of monies pursuant to judgment was brought during appeal from original action, attorneys were never discharged, and issue *535 of lack of proper notice was never raised). Thompson contends that his letter to Montgomery & Andrews dated September 18, 1987, advising the amount of attorney's fees and costs claimed as of that date under a contingent fee agreement with the DeFillippos amounted to notice of a charging lien. We do not quibble over the fact that Thompson's letter fails to mention the word "lien." His claim fails for more substantial reasons.
The letter was written, as determined from its clear import, in response to a request by the defense law firm for information, so that the defendant could put together an offer of settlement in the DeFillippo lawsuit. In that letter Thompson advised of a lien claim by Blue Cross/Blue Shield; he indicated the attorney's fees and costs he was claiming under his contingent fee arrangement with the DeFillippos, as set forth earlier; and, while indicating that he had invested more time than the hours noted, he wrote that "in hopes that we can arrange a satisfactory, prompt settlement of this case, that is all the time I will claim." With the letter, he also forwarded a copy of medical reports.
At the time that letter was written, Thompson was still representing the DeFillippos and had not been terminated. As noted in Prichard,
[T]he lien originated in the desire on the part of the courts to protect attorneys against dishonest clients, who, utilizing the services of the attorney to establish and enable them to enforce their claims against their debtors, sought to evade payment for the services which enabled them to recover their demand.
Id. at 145, 159 P. at 42. Based on Thompson's own pleadings, there is no indication that the DeFillippos had any intention as of September 1987 of evading payment of his services. In fact, at that time there is no assertion of any need by Thompson to protect his claim to attorney's fees and costs. It was not until almost six weeks later, on November 3, 1987, that the DeFillippos terminated Thompson's services and asked him to withdraw officially as their attorney. Thus, Thompson cannot transform into a notice of a charging lien a letter written for the purpose of furnishing factual information for settlement purposes and impose upon the recipient of that letter an awareness that Thompson's clients had no intention of paying him when Thompson himself did not know that at the time. And if he did have any inkling that payment of his fees was in jeopardy, he certainly did not make it known in the letter he relies on.
Prichard carefully sets forth straightforward guidelines for perfecting a charging lien. At the heart of the matter is the requirement that clear and unequivocal notice be given of the intention to assert a lien against any judgment or recovery so that all parties concerned are aware that no voluntary payment should be made without protecting the attorney's claim of fees and costs. First and foremost, while the language need not be formal, that notice must clearly establish that a lien is being claimed against any money or property due the attorney's clients. Cf. Romero v. Earl, 111 N.M. 789, 810 P.2d 808 (1991) (discussing requirements for a "Doctor's Lien"). The notice of lien must be given to the appropriate parties. This would include not only opposing counsel, in this case a law firm representing an insurance company, but also the insurance company itself, as well as the attorney's own clients. Additionally, the attorney claiming a charging lien should file notice of such lien in the court file, if suit is then pending, or later, when filed. As Judge Sitterly in the case before us correctly observed during the hearing:
It would not make good economic practice * * * to have that be up in the air like that or to put that duty on the defendants' lawyers to figure it out. I think the attorney has to be first responsible for protecting himself and then, once he has protected himself, then sharp practice to try to defeat his rights or his payment would be frowned upon by the Court. That didn't occur here.
Here, Thompson failed to give any notice of his claim to a charging lien, as did the attorney in Prichard v. Fulmer, and as in that case, the claim must fail.
We also note that Prichard v. Fulmer indicates the assertion of a charging *536 lien should be made in the court in which the underlying suit is filed, not in an independent action, such as was done here. The supreme court stated that no case had been called to its attention where, in the absence of a statute, a court had permitted an attorney to assert his lien in an independent suit and said the reason was plain.
The courts only give him a lien upon the judgment, or, perhaps more properly speaking, give him the right to invoke the aid of the court, by the control which it exercises over its process and officers in the cause in which the judgment was rendered, in securing for him his just compensation.
Id. at 145-46, 159 P. at 42-43. The supreme court in Prichard added that the willingness of the court to protect the attorney, gives the diligent attorney an ample remedy.
One who has been dilatory, and has permitted the client to collect the judgment, without objection or protest, or seeking aid from the court, cannot invoke the aid of a court of equity; nor can he ask the court, after he has permitted it [to dispose of the property], to set aside its acts in the premises.
Id. at 146, 159 P. at 43. The court added that "`equity aids the vigilant, not those who slumber on their rights.'" Id.; see also Heinzman v. Fine, Fine, Legum & Fine, 217 Va. 958, 234 S.E.2d 282 (1977) (former attorney filed motion in original action to recover in quantum meruit); compare Rhoades v. Norfolk & W. Ry. Co., 78 Ill.2d 217, 35 Ill.Dec. 680, 399 N.E.2d 969 (1979) (where law firm discharged by client brought independent action against former client and its employer after settlement, any recovery was to be based upon quantum meruit, not equitable lien). But see Hansen v. Haywood, 186 Cal. App.3d 350, 230 Cal. Rptr. 580 (1986) (equitable lien, which survives discharge, is for quantum meruit and subsequent, independent action is required to establish amount of lien and to enforce it).
Here Thompson seeks to invoke the aid of the court in an independent action after the funds have been disposed of and without ever notifying the proper parties of his alleged claim. Compare Hanna Paint Mfg. Co. v. Rodey, Dickason, Sloan, Akin & Robb. Since it is not possible for the Sandoval County court to protect Thompson, clearly the district court of Bernalillo County cannot do so.
While it is correct that a district court may freely afford the claimant an opportunity to amend in order to assert viable alternative causes of action, see Buhler v. Marrujo, 86 N.M. 399, 524 P.2d 1015 (Ct.App. 1974) overruled on other grounds, Three Rivers Land Co. v. Maddoux, that rule does not apply here. First, Thompson has not shown that he made any request of the district court to amend, and, second, he has not demonstrated to this court that he has any viable alternative claim against these defendants. In so holding, we do not mean to imply that Thompson cannot pursue any claim he might have against his original clients. We simply hold that he has no cause of action against the defendants in this suit.
While we base our holding upon lack of notice, we note that in some jurisdictions the lien attaches pursuant to the fee arrangement or when suit is filed and service had, whether or not notice in writing has been served. See, e.g., Kleager v. Schaneman, 212 Neb. 333, 322 N.W.2d 659 (1982); Downs v. Hodge, 413 S.W.2d 519 (Ct.App. 1967); Dunagan v. Marell Farms, Inc., 95 Ga. App. 857, 99 S.E.2d 236 (1957); see also 7 Am.Jur.2d, Attorneys at Law, § 329 (1980). We note that many other courts, pursuant either to statute or common law, require written notice. See, e.g., Rhoades v. Norfolk & W. Ry. Co.; see generally Annotation, Sufficiency of Notice to Opposing Party (Or of Serving or Filing Thereof) Required to Establish Attorney's Lien Upon Client's Claim or Cause of Action, 85 A.L.R.2d 859 (1962).
We affirm the district court's order of dismissal.
IT IS SO ORDERED.
ALARID, C.J., and MINZNER, J., concur.
