
636 N.W.2d 604 (2001)
PINE ISLAND FARMERS COOP, et al., Appellants,
v.
ERSTAD & RIEMER, P.A., et al., Respondents.
No. C1-01-670.
Court of Appeals of Minnesota.
December 11, 2001.
*605 William A. Moeller, Dustin J. Cross, Gislason & Hunter LLP, New Ulm, MN, for appellants.
Kay Nord Hunt, Phillip A. Cole, Lommen, Nelson, Cole & Stageberg, P.A., Minneapolis, MN, for respondents.
*606 Considered and decided by SHUMAKER, Presiding Judge, SCHUMACHER, Judge, and FOLEY, Judge.

OPINION
DANIEL F. FOLEY, Judge.[*]
Appellants, insurer and insured, contend that the district court erred in holding that the insurer does not have an attorney-client relationship with respondents. Appellants also argue that the district court properly granted the insurer standing to sue respondents for legal malpractice under the doctrine of equitable subrogation. Because the district court properly held that the insurer did not have an attorney-client relationship with respondents, we affirm this holding, but we reverse the holding that the insurer can sue respondents under equitable subrogation. In addition, we remand the case for further proceedings pursuant to the parties' stipulation.

FACTS
This appeal arises from respondents' legal representation of appellants in Duane Windhorst v. Pine Island Farmers Elevator Co., No. C8-96-562 (Minn.Dist.Ct., Mar. 3, 1999) (Pine Island action).

A. Pine Island Action
The Pine Island action involved plaintiff Windhorst, a dairy farmer, who purchased a milk metering system (equipment) manufactured by Alfa Laval Agri (Alfa Laval) from appellant Pine Island Farmers Coop (Pine Island). Windhorst and Pine Island executed a purchase agreement that set forth the terms and conditions governing the equipment, including Windhorst's requirement that an Alfa Laval representative be present during installation. Windhorst experienced problems with the cleaning process of the equipment and claimed that such problems caused bacteria to grow in the milk lines, infecting his cows with mastitis, which resulted in loss of milk production and required culling of the herd.
In November 1996, Windhorst sued Pine Island for (1) breach of contract for failure to install properly the equipment; (2) negligence in installation and inspection of the equipment; and (3) breach of express warranties. Appellant Farmland Mutual Insurance Company (Farmland), Pine Island's insurance carrier, retained respondent law firm Erstad & Riemer, P.A., and its attorneys Lawrence Skolund and John Thomas, to defend Pine Island. Appellants contend that respondents also represented Farmland, while respondents argue that Pine Island was their sole client.
After being retained as counsel, Skolund and Thomas discussed with Farmland the possibility of impleading Alfa Laval. Skolund recommended to Farmland that Pine Island's defense be that Windhorst's poor farming practices caused the damage, and he reasoned that Alfa Laval would be more helpful as a witness than as a party opponent. Alfa Laval was not impleaded.
At trial, Windhorst proceeded on a negligence theory. Skolund did not object until Windhorst rested his case; Skolund then moved for a directed verdict, arguing that Windhorst's facts were weak on negligence and that his true cause of action was in contract, not tort. On the issue of contract theory, the district court responded.

*607 [H]ad it been sued on a contract theory, you would probably be in a position to have your motion that you have just made with respect to liability on the party of the elevator granted, but indeed it is sued and has been tried on a negligence theory * * *.
The court denied Skolund's directed verdict motion. Skolund's defense focused on Windhorst's culpability and relied on experts who concluded that Windhorst's poor farming practices, rather than the equipment, caused the alleged cleaning problem. In a special verdict, the jury found Pine Island 90% at fault for installation of the equipment and found Windhorst 10% at fault. Skolund filed posttrial motions arguing for a new trial, remittitur, or judgment notwithstanding the verdict. The district court denied all motions. Pine Island appealed, but appellants later settled with Windhorst, without consulting respondents.

B. Present Action Against Respondents
Thereafter, appellants commenced this suit, arguing (1) professional negligence for failure to assert limitation of warranties and remedies defenses; (2) failure to implead a third party; and (3) breach of contract for failure to furnish competent legal services. Respondents moved for summary judgment, arguing that (1) Farmland lacked standing to sue because it was not their client; (2) failure to raise the limitation of warranties and remedies defense did not constitute legal malpractice; and (3) the claim regarding failure to implead a third party did not state a cause of action.
In December 2000, the district court granted respondents summary judgment with respect to appellants' claims, except for Pine Island's claim for failure to implead. Although the motion dismissed all of Farmland's claims, the district court granted Farmland standing to sue respondents for malpractice under the doctrine of equitable subrogation. In February 2001, pursuant to the parties' stipulation, the district court entered an appealable judgment dismissing with prejudice all claims against respondents, except Pine Island's claim for failure to implead.[1] This appeal followed.
Due to the parties' stipulation, our focus is directed to Farmland's standing to sue respondents for legal malpractice.[2] For the reasons stated in this opinion, we conclude that Farmland does not have standing to assert a claim for legal malpractice under the doctrine of equitable subrogation or otherwise.

ISSUES
1. Did the district court err in finding that the insurer did not have an attorney-client relationship with the defense attorneys retained for the insured?
2. Did the district court err in finding that the doctrine of equitable subrogation allowed the insurer to sue for legal malpractice related to representation of the insured?

ANALYSIS
On an appeal from summary judgment, the reviewing court asks two questions: (1) whether there are any genuine issues of material fact and (2) whether the *608 district court erred in its application of the law. State by Cooper v. French, 460 N.W.2d 2, 4 (Minn.1990) (citation omitted). There are no genuine issues of material facts when the "record taken as a whole could not lead a rational trier of fact to find for the nonmoving party." DLH Inc. v. Russ, 566 N.W.2d 60, 69 (Minn.1997) (quoting Matsushita Elec. Indus. Co. v. Zenith Radio Corp., 475 U.S. 574, 587, 106 S.Ct. 1348, 1356, 89 L.Ed.2d 538 (1986)).
Appellants contend that respondents were professionally negligent in their representation of Pine Island in the underlying suit. In order to prevail on a legal malpractice claim, a plaintiff must prove (1) the existence of an attorney-client relationship; (2) acts constituting negligence or breach of contract; (3) such acts proximately caused plaintiff's damages; and (4) but for defendant's conduct, plaintiff would have been successful in the action. Rouse v. Dunkley & Bennett, P.A., 520 N.W.2d 406, 408 (Minn.1994). Failure to prove any of these elements defeats the claim for malpractice. Id. Here, the parties dispute the existence of an attorney-client relationship and respondents' negligence in the underlying suit.

I. Attorney-Client Relationship
The district court found that Farmland was not respondents' client. Farmland asserts that under Minnesota law, an attorney hired by an insurance company to represent an insured has an attorney-client relationship with both the insured and the insurer. Respondents argue that under Minnesota law the insured is the sole client.
Although Minnesota law has not firmly established that the insured is the sole client of defense counsel, pronouncements of the Minnesota Supreme Court are consistent with this conclusion. The supreme court has stated that attorneys hired by an insurance company "owe their allegiance to their clients, the insureds, to best represent their interests." Miller v. Shugart, 316 N.W.2d 729, 733 (Minn.1982). In Miller, the court relied on Minn.Code of Prof'l Responsibility DR 5-107(B) (1980), which precludes attorneys from allowing someone who employs counsel for another from interfering with legal representation of the client:
A lawyer shall not permit a person who recommends, employs or pays him to render legal services for another to direct or regulate his professional judgment in rendering such legal services.
Code of Professional Responsibility, DR 5-107(B), now embodied in Minn. R. Prof. Conduct 5.4(c). The rules governing attorney conduct impose these restrictions to ensure that those paying for legal representation do not interfere with the lawyer's exercise of independent professional judgment on behalf of the client. Minn. R. Prof. Conduct 5.4 cmt (1985).
Both caselaw and the Minnesota Rules of Professional Conduct recognize that potential conflicts may arise between the insured and the insurer when the insurer retains defense attorneys. See, e.g., Mutual Serv. Cas. Ins. Co. v. Luetmer, 474 N.W.2d 365, 368 (Minn.App.1991) (citing Bogard v. Employers Cas. Co., 164 Cal. App.3d 602, 210 Cal.Rptr. 578, 582 (1985)) (counsel selected by insurer may have compelling interest in protecting rights of insurer rather than rights of insured because of counsel's closer ties with insurer). The rules require that when an insurer hires counsel for the insured and the insurer and the insured have conflicting interests, the attorney's duty of loyalty is to the insured:
[W]hen an insurer and its insured have conflicting interests in a matter arising from a liability insurance agreement, and the insurer is required to provide special counsel for the insured, the arrangement *609 should assure the special counsel's professional independence.
Minn. R. Prof. Conduct 1.7 cmt. (1985).
Consistent with both Minnesota law and its rules of professional conduct, we hold that the insured is the sole client of the defense attorneys hired by the insurer. We are not alone in this holding. Many other courts have concluded that the insured is the sole client of defense counsel retained by an insurer. See, e.g., In re Rules of Prof'l Conduct, 299 Mont. 321, 2 P.3d 806, 814 (2000) (relying on Montana Rules of Professional Conduct to hold that insured is sole client of defense counsel); see also Cont'l Cas. Co. v. Pullman, Comley, Bradley & Reeves, 929 F.2d 103, 108 (2nd Cir.1991) (holding that in an insurance context, attorney owes allegiance to insured, not to insurer who retained him); First Am. Carriers, Inc. v. Kroger Co., 302 Ark. 86, 787 S.W.2d 669, 671 (1990) (holding that when insurer retains lawyer to defend insured, insured is lawyer's client); Mich. Millers Mut. Ins. Co. v. Bronson Plating Co., 197 Mich.App. 482, 496 N.W.2d 373, 378 (1992) (holding that no attorney-client relationship exists between insurer and attorney representing insured; attorney's sole duty and loyalty is to insured); Jackson v. Trapier, 42 Misc.2d 139, 247 N.Y.S.2d 315, 316 (1964) (concluding that insured and not insurer is client of defense attorney, even if insurer chose and paid for counsel); Point Pleasant Canoe Rental, Inc. v. Tinicum Township, 110 F.R.D. 166, 170 (E.D.Pa.1986) (holding that when insurer retains attorney to defend insured, insured is attorney's client).
In April 1996, Farmland, as Pine Island's liability insurance carrier, retained respondents to defend Pine Island in the underlying action. After respondents were retained as counsel, attorney Skolund sent a letter to the plaintiff's attorney in the underlying case to inform him that he was representing Pine Island. Farmland's name was not mentioned as a client.
The record does show that respondents consulted Farmland about litigation matters concerning the underlying suit, including whether Pine Island should implead the manufacturer of the milk metering system. Although appellants contend this consultation established an implied contract and established an attorney-client relationship, the record demonstrates that respondents merely advised Farmland of their defense strategies and sought Farmland's input regarding those strategies. Because the record shows that Farmland retained respondents to defend Pine Island, Pine Island was its sole client.[3] Succinctly stated, when Farmland engaged respondents to represent Pine Island in the underlying action, it was merely fulfilling its contractual obligation to pay for Pine Island's defense, but that did not establish an attorney-client relationship between Farmland and respondents.

II. Equitable Subrogation
Subrogation is the substitution of an insurer in the pursuit of the rights of the insured. Medica, Inc. v. Atl. Mut. Ins. Co., 566 N.W.2d 74, 76 (Minn.1997). It allows the insurer to stand in the shoes of the insured and acquire all of the insured's rights against a third party. Id. at 77. The policy behind subrogation rests on the theory that no one should be enriched by another's loss. Id. Equitable subrogation places the charge where it ought to rest, by compelling the payment of the debt by him who ought in equity to pay it. Id. The *610 application of equitable subrogation is generally a question of law subject to de novo review. Ill. Farmers Ins. Co. v. Schmuckler, 603 N.W.2d 138, 140 (Minn.App.1999), review denied (Minn. Feb. 23, 2000).
While no Minnesota case has discussed equitable subrogation as a viable basis for an insurer to bring a malpractice action against an insured's attorney, the Michigan Supreme Court has allowed an insurer to sue defense counsel under this theory. See Atlanta Int'l Ins. Co. v. Bell, 438 Mich. 512, 475 N.W.2d 294, 297 (1991). In Bell the Michigan court weighed the legal doctrine that limits the right to sue for malpractice to those in special privity with the attorney against the insurer's duty to defend and right to control litigation. Id. In analyzing the applicability of equitable subrogation, the court struggled with the tripartite relationship among the insurer, the insured, and defense counsel and reasoned that
[t]o hold that an attorney-client relationship exists between insurer and defense counsel could indeed work mischief, yet to hold that a mere commercial relationship exists would work obfuscation and injustice.
Id. The court concluded that equitable subrogation resulted in the proper placement of the social costs of malpractice without jeopardizing the attorney-client relationship between insureds and defense counsel. Id.
In a dissenting opinion, the chief justice argued that the relationship among an attorney, an insured, and an insurer arises from the insurance contract requiring the insured to make certain disclosures to the insurance carrier and to cooperate in defense of the claim. Id. at 301. Because an attorney does not owe a legal duty to an adversary, the dissenting justices would have declined to recognize a duty owed to the insurer:
In every case where an attorney is hired by an insurer to represent the insured, the attorney embarks down a road laden with potential conflict. * * * To recognize a separate duty to the insurer might significantly interfere with the attorney's ability to choose the most appropriate course of action for the insured.
Id. at 302-03. The dissent criticized the majority's conclusion that the insurer and the insured were not adversaries because their interests were aligned as a distinction without a difference. Id. at 307.
In the present case, the district court found the majority in Bell persuasive and held that Farmland may prosecute a malpractice claim against respondents under equitable subrogation. But Bell's application of the doctrine of equitable subrogation does not control the issues in the case at bar. Bell was decided by a divided court and limited to the facts of that case. Moreover, the dissenting opinion is more consistent with prevailing Minnesota law prohibiting an assignment of legal malpractice claims. See Wagener v. McDonald, 509 N.W.2d 188, 190 (Minn.App. 1993) (citing Picadilly, Inc. v. Raikos, 582 N.E.2d 338, 341 (Ind.1991), and Goodley v. Wank & Wank, Inc., 62 Cal.App.3d 389, 133 Cal.Rptr. 83, 86 (1976)) (holding that assignment of legal malpractice claims is contrary to Minnesota public policy because incompatible with (1) attorney's duty to act loyally towards client; (2) attorney's duty to maintain confidentiality; and (3) fiduciary attorney-client relationship that is restricted only to parties involved). Whether an insurer in Minnesota can sue defense counsel under the doctrine of equitable subrogation is best left to the Minnesota Supreme Court. See Tereault v. Palmer, 413 N.W.2d 283, 286 (Minn.App. 1987) (noting "task of extending laws falls to the supreme court or the legislature, *611 but it does not fall to this court"), review denied (Minn. Dec. 18, 1987).
Here, the district court did not expressly determine in what way equity would favor the insurer. In the underlying case, Pine Island, the insured, appealed the verdict. While that appeal was pending, and without consulting defense counsel, appellants settled with Windhorst, the injured party. It is a maxim of equity that "he who seeks equity must do equity, and he who comes into equity must come with clean hands." Hruska v. Chandler Assocs., Inc., 372 N.W.2d 709, 715 (Minn. 1985) (citing Johnson v. Freberg, 178 Minn. 594, 597-98, 228 N.W. 159, 160 (1929)). The case had not proceeded to final judgment on appeal, yet appellants settled with Windhorst without even consulting respondents. Now, Farmland is attempting to sue respondents for legal malpractice in the underlying suit through equitable subrogation, but the doctrine of "unclean hands" prevents it from any recourse in equity. The district court erred in applying the doctrine of equitable subrogation, and we reverse on that issue.

III.
Having determined that Farmland does not have standing to sue for malpractice, it is unnecessary to consider (1) the application of the economic loss doctrine under Minn.Stat. § 604.10 (2000) or its ramifications in the underlying suit, or (2) whether respondents negligently failed to advise Farmland of the consequences of impleading the manufacturer. Finally, we observe that the district court's ruling was inconsistent. The court simultaneously held that no attorney-client relationship existed between Farmland and respondents and that Farmland had standing to sue under the doctrine of equitable subrogation. There are no equities here favoring such a decision.

DECISION
We affirm the district court's finding that Farmland was not respondents' client because Pine Island, as the insured, was the sole client. We reverse the district court's holding that Farmland may sue under the doctrine of equitable subrogation. The case is remanded for further proceedings pursuant to the parties' stipulation.
Affirmed in part, reversed in part, and remanded.
NOTES
[*]  Retired judge of the Minnesota Court of Appeals, serving by appointment pursuant to Minn. Const. art. VI, § 10.
[1]  Pine Island, as the client, has standing to assert a claim for legal malpractice against respondents as outlined in the parties' stipulation.
[2]  The district court stayed Pine Island's impleader claim and respondents' counterclaim pending this appeal from the final partial judgment, and these claims are not addressed in this opinion.
[3]  Our holding that an insured is the sole client of defense counsel renders moot Farmland's arguments that they established an attorney-client relationship with respondents under both tort and contract theories. Therefore, we decline to address these issues.
