
697 A.2d 1272 (1997)
1997 ME 159
J. Carolyn SARGENT
v.
Philip BUCKLEY, et al.
Supreme Judicial Court of Maine.
Submitted on Briefs March 14, 1997.
Decided July 21, 1997.
*1273 Timothy Murphy, Gardner, Gardner & Murphy, Saco, for plaintiff.
Michael G. Messerschmidt, Kevin J. Beal, Preti, Flaherty, Beliveau & Pacios, LLC, Portland, for plaintiff.
Before WATHEN, C.J., and ROBERTS, GLASSMAN, CLIFFORD, and LIPEZ, JJ.
WATHEN, Chief Justice.
[¶ 1] Plaintiff, J. Carolyn Sargent, appeals from the judgment entered in the Superior Court (Penobscot County, Marsano, J.) granting defendants' motion to dismiss plaintiff's amended complaint pursuant to M.R. Civ. P.12(b)(6). The complaint was brought against an individual attorney, Philip Buckley, and his law firm, Rudman & Winchell. It alleges claims of fraud and breach of a fiduciary duty arising from defendants' representation of plaintiff's husband in her action for divorce. With respect to count I of the complaint, plaintiff argues that the court erred by ruling that she has failed to state a claim for fraud and erred by ruling that defendants had no duty to file a marital property list with the divorce court pursuant to M.R. Civ. P.80(n). With respect to count II, plaintiff argues that the court erred in ruling that an attorney's breach of the fiduciary duty of loyalty to a former client is not actionable. We determine that count I is barred by the final judgment in Sargent v. Sargent, 677 A.2d 528 (Me.1996) (Sargent II),[1] and that the court erred by dismissing count II. Thus, we vacate the judgment on count II.
[¶ 2] The factual background and procedural history may be summarized as follows: Plaintiff and James Sargent were married in 1978. Before the marriage they entered into an ante-nuptial agreement providing that, in the event of a divorce, plaintiff would receive $5,000 in lieu of alimony, support and property settlement rights. For the purposes of this agreement, plaintiff was represented by attorney Albert Winchell, now deceased, a partner of defendant Rudman & Winchell. The firm also represented plaintiff in other *1274 legal matters before and during the marriage to James.
[¶ 3] The complaint alleges that in early 1989, plaintiff and James Sargent began the process of separation. James sought legal advice from defendant Philip Buckley, a partner of Rudman & Winchell, and plaintiff sought advice from a Lewiston attorney. Buckley knew that his partner Albert Winchell had represented plaintiff in negotiating the ante-nuptial agreement and that the firm had represented her in other matters. In April 1989, Buckley was advised by an associate in the firm that he should obtain written consent from plaintiff before representing James Sargent on the separation and divorce, because the firm represented plaintiff on the antenuptial agreement. Buckley never obtained such consent. A separation agreement was entered into in April, 1989. The agreement provided that plaintiff was to receive approximately one million dollars in cash and property and that the terms of the agreement were to be incorporated into the divorce decree. Neither plaintiff nor her attorney attended the subsequent divorce hearing. Buckley presented the separation agreement to the District Court at the hearing and the court issued a decree incorporating the terms of the agreement.
[¶ 4] In 1992, plaintiff filed suit against James alleging that he fraudulently induced her to enter into the separation agreement by misrepresenting the value of the marital estate. While her appeal from summary judgment was pending, plaintiff brought the present action alleging that Buckley conspired with James in concealing and misrepresenting the value of the marital estate, and that Buckley breached the fiduciary duty of loyalty owed to plaintiff as a former client. Defendants' answer asserted that the complaint fails to state a claim on which relief can be granted, and that it is barred by res judicata, collateral estoppel, and the statute of limitations. Defendant filed a motion to dismiss for failure to state a claim pursuant to M.R. Civ. P. 12(b)(6), for failure to file within the statute of limitations and for failure to plead fraud with sufficient particularity pursuant to M.R. Civ. P. 9(b). Plaintiff filed a motion to amend her complaint to more particularly allege fraud and to include count II for the breach of a professional duty. After granting plaintiff's motion to amend, the court dismissed the complaint basing its order solely on M.R. Civ. P. 12(b)(6).

Count I
[¶ 5] While this appeal was pending, we issued our decision in Sargent II, 677 A.2d 528 (Me.1996) affirming a summary judgment in favor of James Sargent on plaintiff's claims of civil fraud and misrepresentation. She alleged in that action that James led her to believe that the marital estate totalled $2 million dollars when he knew it totalled $17 million dollars. We held that plaintiff failed to establish justifiable reliance on the alleged misrepresentations, a necessary element of fraud. The record established that plaintiff did not believe her husband's misrepresentations about his wealth at the time of the settlement agreement, and that during the divorce negotiations she believed "her husband was worth something more than 14 million dollars." Id. at 530. It was also established that plaintiff's attorney advised her not to sign the settlement agreement, and that she chose not to engage in discovery or to contest the divorce. Based on this evidence we concluded that "there was no reliance" by her on her husband's misrepresentations. Id.
[¶ 6] It necessarily follows from the decision in Sargent II that plaintiff is collaterally estopped from asserting justifiable reliance on the same misrepresentations and concealments allegedly made by attorney Buckley. Based on the findings made in Sargent II, she cannot have relied on misrepresentations asserting the marital estate to be $2 million dollars regardless of the source of the misrepresentations. Collateral estoppel bars plaintiff from asserting an issue of fact or law that was actually litigated on the merits and determined by a valid final judgment in a prior action if the issue was essential to the judgment. Morton v. Schneider, 612 A.2d 1285, 1286 (Me.1992). Plaintiff's awareness of the general extent of James Sargent's wealth is an issue of fact that was actually litigated on the merits, determined *1275 by a final judgment, and was essential to that judgment. She is now barred from asserting her ignorance of the extent of Sargent's wealth, a fact that is necessary for proving her reliance on Buckley's alleged misrepresentations. The fact that defendants were not parties to the prior action is immaterial in this non-mutual defensive application of collateral estoppel. Hossler v. Barry, 403 A.2d 762, 768 (Me.1979).
[¶ 7] Because plaintiff's allegations of fraud are barred by collateral estoppel, we need not address her argument that defendants had a duty to file a marital property list with the divorce court.

Count II
[¶ 8] Plaintiff alleges that defendants Buckley and Rudman & Winchell owed her a fiduciary duty of loyalty as a former client, and that their breach resulted in harm to her. She specifically alleges that defendants breached the duty of loyalty by representing James Sargent in the divorce and by using confidential information in their representation of James. She also alleges that attorney Buckley violated the Maine Bar Rules that provide:
A lawyer shall not accept employment adverse to a former client without that client's informed written consent if such new employment involves the subject matter of the former employment or may involve the use of confidential information obtained through such former employment.
M. Bar R. 3.4(e).[2] In its dismissal of count II the court reasoned that a violation of the Maine Bar Rules does not give rise to a cause of action for legal malpractice. We agree with plaintiff that the court erred by failing to recognize that she presented a claim for relief based on a breach of common law fiduciary duties. She relies on the Maine Bar Rules merely as evidence of the applicable standard of care.[3]
[¶ 9] We have held that an "attorney and client necessarily share a fiduciary relationship of the highest confidence." Anderson v. Neal, 428 A.2d 1189, 1191 (Me. 1981). In Peaslee v. Pedco, Inc., 388 A.2d 103 (Me.1978), an attorney's breach of the duty of loyalty supported an action for rescission of a land contract. The fiduciary obligations of an attorney are derived from common law and equity independent of professional rules of conduct. 2 Ronald E. Mallen & Jeffrey M. Smith Legal Malpractice, § 14.1(4th ed. 1996). "[T]he basic fiduciary obligations are two-fold: undivided loyalty and confidentiality.... These common-law duties predate and exist despite independent, codified ethical standards." Id. at 227-28. "A lawyer who acts adversely to a former client can be sued for the financial consequences of disloyalty, which primarily is for abuse of confidences." Id. § 16.23 at 483-4.
[¶ 10] A motion to dismiss for failure to state a claim tests only the sufficiency of the complaint. In reviewing the trial court's dismissal, we accept the material allegations of the complaint as true and examine the complaint in "the light most favorable to the plaintiff to determine whether it sets forth the elements of a cause of action or alleges facts that would entitle the plaintiff to relief pursuant to some legal theory." Hamilton v. Greenleaf, 677 A.2d 525, 527 (Me. 1996). We will uphold a dismissal "only when it appears beyond doubt that a plaintiff is entitled to no relief under any set of facts that he might prove in support of his claim." Id. The legal sufficiency of a complaint is a question of law. Id.
[¶ 11] Plaintiff's complaint alleges that defendants breached their duty of loyalty to her as a former client by representing *1276 James Sargent without her consent, and by disclosing confidential information during that representation. Count II is actionable because we cannot rule as a matter of law that she is entitled to no relief under any set of facts that she might prove in support of her claim.[4]
[¶ 12] The entry is:
Judgment on Count I affirmed. Judgment on Count II vacated. Remanded for further proceedings consistent with the opinion herein.
NOTES
[1]  This is the fourth time plaintiff has sought review of a judgment arising from her divorce. In Sargent v. Sargent, 622 A.2d 721 (Me.1993) (Sargent I) we vacated a dismissal of plaintiff's complaint alleging that James Sargent fraudulently induced her to enter a separation agreement. In Sargent v. Sargent, 677 A.2d 528 (Me.1996) (Sargent II) we affirmed a summary judgment in favor of James in the same action. In Sargent v. Sargent, 691 A.2d 184 (Me.1997) (Sargent III) we affirmed the court's denial of her motion to set the divorce judgment aside.
[2]  Rule 3.4 was amended in 1993. The relevant provision is now contained in M.Bar R. 3.4(d)(1) that provides:

Except as permitted by this rule, a lawyer shall not commence representation adverse to a former client without the client's informed written consent if such new representation is substantially related to the subject matter of the former representation or may involve the use of confidential information obtained though such former representation.
(Emphasis added to highlight amended language.)
[3]  We have stated that: "The provisions of the code of professional responsibility and the disciplinary rules are useful guidelines for the understanding of a lawyer's obligations." In Re Dineen, 380 A.2d 603, 604 (Me.1977).
[4]  Defendants contend on appeal that count II is barred by the statute of limitations. The court did not rule on the affirmative defense of the statute of limitations and there has not been sufficient factual development to address it on appeal.
