Opinion by
Judge VOGT.In this action seeking indemnification for defense costs in a prior case, defendants, Marjorie E. Bender and Randall C. Bender, appeal the trial court judgment in favor of plaintiffs, Johnson Realty and Vern Johnson (collectively, Johnson). We affirm in part, reverse in part, and remand.
The Benders entered into a series of listing agreements with Johnson for the sale of their ranch. After the last agreement expired in September 1998, Johnson, with the Benders' permission, showed the ranch to the eventual buyers and negotiated the sale of the ranch to them.
The buyers later sued the Benders and Johnson for misrepresentation, negligence, and unjust enrichment, claiming that a brochure they had received from Johnson in November 1993 misrepresented the crop yields on the property. After a bench trial, at which the Benders and Johnson were represented by separate counsel, judgment was entered in favor of the defendants.
Johnson then filed this action seeking indemnity for attorney fees and costs he incurred in defending against the buyers' claims. The trial court granted summary judgment in favor of Johnson. It rejected Johnson's contention that he was entitled to indemnification under a clause in the listing agreement, but concluded that he had a right to indemnification under common law agency principles. The court also determined that Johnson's failure to give timely notice to the Benders of the claim for indemnification did not bar that claim. Pursuant to the parties' stipulation, judgment was entered for Johnson in the amount of $45,000, plus interest and costs.
I.
The Benders first contend that the trial court erred in determining that an agency relationship existed between them and Johnson. We disagree.
We review a summary judgment de movo, applying the same standards that govern the trial court's determination. Summary judgment is warranted only upon a clear showing that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law. C.R.C.P. 56(c); Churchey v. Adolph Coors Co., 759 P.2d 1336 (Colo.1988).
Although the existence of an agency relationship is generally a question of fact, a court may decide the issue as a matter of law when, as here, the facts are undisputed. City & County of Denver v. Fey Concert Co., 960 P.2d 657 (Colo.1998).
Under common law agency principles, a real estate broker working for the seller in a real estate transaction stands in an agency relationship with the seller. Olsen v. Vail Associates Real Estate, Inc., 935 P.2d 975 (Colo.1997); see Stortroen v. Beneficial Finance Co., 736 P.2d 391 (Colo.1987). An agency relationship between the seller and the broker may exist even where there is no written listing agreement in place, if the parties agreed to enter into a relation to which the law attaches the legal consequences of agency. Cole v. Jennings, 847 P.2d 200 (Colo.App.1992).
In 1998, the General Assembly enacted legislation, effective January 1, 1994, that modified certain common law principles applicable to brokerage relationships. Among other things, a broker who assists parties in a real estate transaction without a written agreement is deemed under these statutes to be a transaction-broker, not an agent of either party. See §§ 12-61-802(6), 12-61-803(2), 12-61-807(1), C.R.S.2001.
Here, the record amply supports the trial court's finding that, after expiration of the last listing agreement, there was still an agency relationship between the Benders and Johnson for purposes of selling the ranch. The Benders had employed Johnson for the specific purpose of selling their ranch, were aware that Johnson was showing the property and negotiating with the buyers after the *1218written agreement had expired, and in fact informed the buyers that they were to discuss any questions they had with Johnson.
The Benders do not dispute the facts relied upon by the trial court to support its agency finding, but argue that, because the sale was not concluded until after the January 1, 1994, effective date of the new brokerage legislation, and there was no written listing agreement at that time, Johnson necessarily had to be deemed a transaction-broker and not their agent. We are not persuaded.
The lawsuit for which Johnson sought indemnification of defense costs arose out of his production and distribution of a brochure that allegedly misrepresented the crop yields on the property. There is no contention that his production and distribution of the brochure was unauthorized. The buyers alleged in their complaint that they had received the brochure from Johnson in November 1998. Thus, regardless of whether the act giving rise to the lawsuit was the preparation of the brochure or, as the trial court found, the presentation of it to the buyers, it took place before January 1, 1994. Therefore, even if Johnson would have been deemed a transaction-broker after that date under the new brokerage statutes, he was acting as the Benders' agent when he prepared the brochure and gave it to the buyers.
IL.
The Benders next contend that, even assuming there was an agency relationship that could give rise to an indemnification obligation at common law, Johnson is barred from seeking indemnification because he did not timely notify them of his indemnity claim and give them an opportunity to participate in or assume his defense. We conclude that a remand is required to address this contention.
As an initial matter, we reject Johnson's contention that he gave the Benders timely notice of his claim by telling them at the outset of the relationship that they would be liable for his actions. Johnson's deposition testimony, appended to the parties' summary judgment briefs, supports the trial court's finding to the contrary. In his deposition, Johnson admitted that he did not notify the Benders at any time before the conclusion of the buyers' lawsuit that he expected indemnification. He further admitted that he did not ask the Benders to provide him with a defense, did not give them an opportunity to approve his counsel or his counsel's hourly rates, and did not consult with them before rejecting the buyers' settlement offer.
A.
As the trial court recognized, a common law duty to indemnify may arise based on a pre-existing legal relationship. See Ringsby Truck Lines, Inc. v. Bradfield, 193 Colo. 151, 563 P.2d 939 (1977) Naiman v. Warren A. Flickinger & Associates, Ltd., 43 Colo.App. 279, 605 P.2d 63 (1979).
Where the relationship is that of principal and agent, the general rule is that an agent is entitled to indemnification from the principal for losses incurred in performance of the agency that, because of the parties' relationship, should fairly be borne by the principal, - See Restatement (Second) of Agency § 438(2)(b) (1958); see also, e.g., Southern Farm Bureau Casualty Ins. Co. v. Gooding, 263 Ark. 435, 565 S.W.2d 421 (1978); Fidelity Mortgage Trustee Service, Inc. v. Ridgegate East Homeowners Ass'n, 27 Cal.App.4th 503, 32 Cal.Rptr.2d 521 (1994).
In particular, an agent is generally entitled to reimbursement of expenses incurred in successfully defending a lawsuit brought by third persons because of the agent's authorized conduct on behalf of the principal. Such expenses may include attorney fees and costs incurred in the underlying action. See Restatement (Second) of Agency, supra, §§ 438 cmt. a, 489(d); Basmajian v. Christie, Manson & Woods International, Inc., 629 F.Supp. 995 (S.D.N.Y.1986); Southern Farm Bureau Casualty Ins. Co. v. Gooding, supra; Fidelity Mortgage Trustee Service, Inc. v. Ridgegate East Homeowners Ass'n, supra.
Contrary to the Benders' contention, Johnson's potential right to indemnification does not turn on whether he was acting as an *1219independent contractor rather than as their employee. The Restatement comments on which the Benders rely refer to the inapplicability of the indemnification requirements to "non-agent" independent contractors. Here, as noted, Johnson was acting as the Benders' agent when he dealt with the buyers. See Stortroen v. Beneficial Finance Co., supra.
B.
The common law right of an agent to indemnification for defense costs is subject to two qualifications that are implicated in this case.
L.
First, an agent seeking such indemnification has a duty to give the principal timely notice and an opportunity to provide the agent with a defense.
If the principal refuses to defend, the agent will be entitled to recover reasonable expenses incurred in defending or compromising the third-party claim. See Southern Farm Bureau Casualty Ins. Co. v. Gooding, supra; Mutual Life Ins. Co. v. Estate of Wesson, 517 So.2d 521 (Miss.1987); Valloric v. Dravo Corp., 178 W.Va. 14, 357 S.E.2d 207 (1987); Restatement (Second) of Agency, supra, § 438 cmts. d, e. However, this rule is "predicated on the fact that the [principal] has originally been notified of the underlying action, has been requested to assume the defense, and has refused to do so." Valloric v. Dravo Corp., supra, 357 S.E.2d at 215.
The courts have taken varying positions on the effect of an agent's failure to request a defense. See Sun Indemmity Co. v. Landis, 119 Colo. 191, 194-95, 201 P.2d 602, 604 (1948)(noting in dictum that there "seem to be divergent views as to [the] right of recovery of attorney fees incurred by indemnitee in defense of the claim indemnified against where indemnitor was not requested to and did not defend in behalf of indemnitee or where it did defend but the indemnitee joined, as here, in such defense").
In some cases, failure to request a defense has been held not to bar recovery if the agent tendered a reasonable defense. See Sunset-Sternau Food Co. v. Bonzi, 60 Cal.2d 834, 36 Cal.Rptr. 741, 389 P.2d 133 (1964); see also Restatement (Second) of Agency, supra, § 438 cmts. d (right of agent who fails to provide timely notice of an indemnification claim is "diminished to the extent that the principal, because of the delay, has been unable to obtain redress against third persons or has otherwise changed his position") & e ("If the agent does not notify the principal and give him an opportunity to defend, he can recover the amount paid upon the claim only if he proves that he made a reasonable defense; if ... he should have given an opportunity to the principal to defend or compromise ... he is not entitled to indemnity for losses resulting from such failure.").
In other cases, failure to give timely notice and make a formal request for defense has not barred indemnification for defense costs if the principal or other indemnitor knew that the agent/indemnitee was defending but did not object or tender a defense. See Long v. Vlasic Food Products Co., 439 F.2d 229 (4th Cir.1971)(recognizing rule that principal should not be required to reimburse agent for defense costs if it had no notice of claim, but allowing indemnification because principal had actual knowledge of suit but took no action to provide a defense); State v. Bloomfield Construction Co., 126 Conn. 349, 11 A.2d 382 (1940); City of Detroit v. Grant, 135 Mich. 626, 98 N.W. 405 (1904); United Pacific Ins. Co. v. Sunset Cove, Inc., 263 Or. 303, 502 P.2d 261 (1972); Miller v. New York Oil Co., 34 Wyo. 272, 243 P. 118 (1926).
Although there are no Colorado cases addressing the effect of failure to give notice of a common law indemnity claim, divisions of this court have reached similarly varying conclusions in cases involving contractual indemnification obligations. Compare Trosper v. Wilkerson, 764 P.2d 375 (Colo.App.1988)(where contract required written notice, indemnitee's failure to give indemnitor notice and opportunity to defend rendered indemnification - provisions - unenforceable), with McStain Corp. v. Elfline Plumbing & Heating, Inc., 38 Colo.App. 473, 558 P.2d 588 (1976)(where contract indemnification provisions did not make notice a condition prece*1220dent to reimbursement, notice was not a prerequisite to suit against indemnitor who had actual knowledge of damages claimed), and Public Service Co. v. United Cable Television of Jeffco, Inc., 816 P.2d 289 (Colo.App.1991)(because indemnitee had not given indemnitor pretrial notice of its claim, it waived its right to reimbursement for defense costs, but did not otherwise forfeit its right to indemnification for damages), rev'd on other grounds, 829 P.2d 1280 (Colo.1992).
We agree with the view that failure to give notice of a common law indemnification claim and demand a defense does not invariably bar the agent's right to indemnification for defense costs, particularly where the principal has knowledge of the claim and does not offer to defend the agent. However, the agent's right to recovery will be diminished to the extent his or her defense was unreasonable or to the extent the principal suffered a loss because it was deprived of the opportunity to settle or to mitigate defense costs.
2.
The second qualification implicated here is the limitation on an agent's recovery of defense costs in an action where the principal is a codefendant.
When an agent seeks reimbursement for legal fees incurred in an action in which the principal was also a defendant and each party provided its own representation, the agent forfeits its right to indemnity unless the principal's defense would have left the agent's interests unprotected. Basmajian v. Christie, Manson & Woods International, Inc., supra (agent not entitled to compensation for fees in successful defense of underlying suit where codefendant principal's defense protected agent's interest, but agent chose to hire its own law firm to defend); Adams v. North Range Iron Co., 191 Minn. 55, 253 N.W. 3 (1934)(where principal's counsel successfully defended both principal and agent up to entry of judgment, agent was not entitled to recover- amounts paid to additional attorneys hired by him on appeal); cf. Admiral Oriental Line v. United States, 86 F.2d 201 (2d Cir.1936)(agent entitled to reimbursement of its defense costs where its interest was separate from that of its codefend-ant principal).
Thus, consistent with these authorities, where an agent and a principal are codefend-ants represented by separate counsel, the agent may not obtain reimbursement for his or her separate defense costs unless it is shown that joint representation would have left the agent's interests unprotected.
C.
Applying these principles to the case before us, we first reject Johnson's contention that he had no obligation to notify the Benders of his indemnification claim until it was finally determined that he was not at fault on any of the buyers' claims. Such a rule would be inconsistent with the requirement that notice and a request for defense be timely, so that the principal has an opportunity to defend or compromise the underlying claim. See Restatement (Second) of Agency, supra, § 438 cmt. e.
We further conclude that disputed issues of fact remain as to whether, under the principles discussed above, Johnson's failure to give timely notice and request a defense should bar recovery of any or all of his claimed defense costs.
The trial court, relying on the comments to Restatement (Second) of Agency, supra, § 438, found that Johnson's right to indemnification was not barred because his defense was reasonable and because the Benders were not prejudiced in that they "could not have obtained redress from a third party and did not otherwise change their position."
However, the trial court did not address whether a separate defense was necessary to protect Johnson's interests, and that issue cannot be determined as a matter of law on the record before us. Further, the court did not consider whether the amount of defense costs potentially recoverable should be reduced because of Johnson's failure to give the Benders an opportunity to consider the buyers' settlement offer or otherwise to approve his defense costs. On remand, the trial court may, in its discretion, permit the *1221parties to present additional evidence or arguments bearing on these issues.
The judgment is affirmed to the extent it determines that Johnson was the Benders' agent for purposes of his indemnification claim. The judgment is reversed to the extent it awards Johnson the full amount of attorney fees and costs he incurred in defending against the buyers' claims, and the case is remanded for further proceedings to determine whether Johnson's recovery should be reduced or denied in light of the principles set forth above.
Judge KAPELKE and Judge CASEBOLT, concur.