
727 N.E.2d 376 (2000)
312 Ill. App.3d 535
245 Ill.Dec. 123
Catherine DOUGLAS, as Assignee of Patricia Cowsert, Plaintiff-Appellant,
v.
ALLIED AMERICAN INSURANCE, a/k/a Gallant Insurance Company, Defendant and Third-Party Plaintiff-Appellee (Randall Kelley, Third-Party Defendant).
No. 5-99-0040.
Appellate Court of Illinois, Fifth District.
March 16, 2000.
Rehearing Denied April 20, 2000.
*377 Joseph E. Hoefert, Hoefert and Perica, P.C., Alton, for Appellant.
Morris B. Chapman, Clarence W. Harrison, II, Morris B. Chapman & Associates, Ltd., Granite City, for Appellee.
*378 Presiding Justice GOLDENHERSH delivered the opinion of the court:
Plaintiff, Catherine Douglas, assignee of Patricia Cowsert, appeals from an order of the Circuit Court of Madison County granting summary judgment in favor of defendant, Allied American Insurance Company, also known as Gallant Insurance Company (hereinafter Allied). Allied had filed a third-party complaint against attorney Randall Kelley. The trial court found in favor of Kelley on Allied's third-party complaint for contribution, and that finding was not appealed by Allied. Therefore, the issue before this court is whether the trial court erred in granting summary judgment in favor of Allied. We reverse and remand.

I. BACKGROUND
On January 19, 1993, plaintiff was involved in an automobile accident with Patricia Cowsert near Medora in Macoupin County. At the time of the accident, Cowsert was 20 years old and insured under a policy issued by Allied. The insurance policy had limits of $20,000 per person and $40,000 per accident.
As a result of the accident, plaintiff filed suit against Cowsert. Three other individuals also filed suit against Cowsert, including Mary Susan Watts, a passenger in the Douglas vehicle, and Laura Hose and Misty Parkerson, passengers in the Cowsert vehicle. Allied hired attorney Randall Kelley to represent Cowsert in the underlying litigation. On July 5, 1994, Allied tendered the policy limits of $40,000 to the court for disbursement to the plaintiffs. On July 14, 1994, Kelley withdrew as counsel for Cowsert. Cowsert was without funds to hire an attorney to defend her in the pending actions, so Cowsert was unrepresented during trial. On August 30, 1994, the trial court entered summary judgment in favor of the plaintiffs and against Cowsert on the issue of liability. On September 7, 1994, the cases were called for hearing on the issue of damages, after which the trial court entered judgment in favor of Parkerson, Hose, Watts, and plaintiff and against Cowsert in the amount of $320,108, $60,917, $654,695, and $404,335, respectively.
On September 28, 1995, plaintiff herein received an assignment from Cowsert for any claim Cowsert might have against Allied for breach of duty to defend. On November 6, 1995, plaintiff filed a declaratory judgment action against Allied pursuant to the assignment from Cowsert. Count I alleged breach of contract and count II alleged bad faith. The parties then engaged in discovery.
During discovery, Allied admitted that it hired Kelley to represent Cowsert and that Kelley filed a motion to withdraw from Cowsert's case; however, Allied denied "that any such motion to withdraw was filed at the instruction, or with the knowledge or approval, of [Allied]." Allied also denied that it had authorized or instructed Kelley not to represent Cowsert at the hearings on plaintiffs motions for summary judgment and damages. Kelley testified contrary to Allied's assertions during his deposition on July 22, 1997.
According to Kelley, Allied "generally" told him what to do concerning the representation of Cowsert. For example, they told him how far they wanted him to go in terms of working up the file, what depositions they wanted him to attend, what discovery they wanted him to engage in, and what court appearances they wanted him to make. Kelley explained that once the check was accepted into the court file, Allied told him not to participate in distribution of the funds or do anything else on the file because Allied believed it had fulfilled its contractual obligations to Cowsert. Kelley testified that Allied never asked his opinion about whether or not it was a good idea to withdraw, nor did they ever ask him to review the policy to determine whether it would be proper to withdraw at that time.
After written discovery and depositions, all parties moved for summary judgment *379 in the declaratory judgment action. The trial court held that Kelley was an agent of Allied, and the court entered summary judgment in favor of Allied and against plaintiff. The trial court also entered summary judgment in favor of Kelley on the third-party complaint. Plaintiff now appeals. Allied did not appeal the trial court's finding in favor of Kelley on the third-party complaint.

II. STANDARD OF REVIEW
It is well-settled in Illinois that a reviewing court will conduct a de novo review of an appeal from the grant of a summary judgment. See Espinoza v. Elgin, Joliet & Eastern Ry. Co., 165 Ill.2d 107, 113, 208 Ill.Dec. 662, 649 N.E.2d 1323, 1326 (1995). The determination of the rights and obligations under an insurance policy is a question of law that is appropriate for disposition by way of summary judgment. See Crum & Forster Managers Corp. v. Resolution Trust Corp., 156 Ill.2d 384, 391, 189 Ill.Dec. 756, 620 N.E.2d 1073, 1077 (1993). A court must construe the policy as a whole and determine the intentions of the parties based on the policy's express terms, taking into account the type of insurance for which the parties have contracted, the risks undertaken and purchased, and the subject matter that is insured, along with the purposes of the entire contract. See Crum & Forster Managers Corp., 156 Ill.2d at 391, 189 Ill.Dec. 756, 620 N.E.2d at 1078. The interpretation of insurance contracts is governed by the rules for interpreting contracts generally, and whether a policy is ambiguous is a question of law for the court. If the court decides the contract is ambiguous, the construction of the contract becomes a question of fact. See Dash v. Messenger Service, Inc. v. Hartford Insurance Co., 221 Ill.App.3d 1007, 164 Ill.Dec. 313, 582 N.E.2d 1257, 1260 (1991). With these principles in mind, we begin an analysis of the issue presented.

III. ANALYSIS
Plaintiff contends that the trial court erred in entering summary judgment against her because there was a genuine issue of law whether Allied breached its duty to defend its insured when it tendered the policy limits to the court without obtaining a release or settlement and withdrew representation of its insured. Plaintiff asserts there is an ambiguity created by the contract language and that Allied had a duty to defend Cowsert until the policy limits were exhausted by payment of a judgment or a settlement. We agree.
The general rule in Illinois is that an insurer's duty to defend and its duty to indemnify are separate and distinct, with the duty to defend being broader than the duty to indemnify. See Crum & Forster Managers Corp., 156 Ill.2d at 393-94, 189 Ill.Dec. 756, 620 N.E.2d at 1080. To determine whether the insurer had a duty to defend an insured, a court must look to the allegations in the underlying complaint and compare those allegations to relevant provisions of the insurance policy. See Outboard Marine Corp. v. Liberty Mutual Insurance Co., 154 Ill.2d 90, 107-08, 180 Ill.Dec. 691, 607 N.E.2d 1204, 1212 (1992). If the facts alleged in the underlying complaint fall within, or even potentially within, the policy's coverage, the insurer's duty to defend arises. See Outboard Marine Corp., 154 Ill.2d at 108, 180 Ill.Dec. 691, 607 N.E.2d at 1212. A refusal to defend is unjustifiable unless the face of the underlying complaint clearly indicates that the facts alleged do not fall potentially within the policy's coverage. See Outboard Marine Corp., 154 Ill.2d at 108, 180 Ill.Dec. 691, 607 N.E.2d 1204.
In making its determination that Allied had no duty to continue to defend Cowsert after it had paid the bodily injury policy limits to the court but before any judgment or settlement was reached, the trial court relied on language found in "Part I Liability, Coverage A, Coverage B," of the policy, which states:

*380 "To pay on behalf of the insured, but only to the extent of the applicable policy limits, all sums which the insured shall become legally obligated to pay as damages because of:
A. bodily injury, or
B. property damage,
arising out of the ownership, maintenance, or use of the owned automobile or any non[]owned automobile, and the company shall defend any suit alleging such bodily injury or property damage and seeking damages which are payable under the terms of this policy, even if any of the allegations of the suit are groundless, false[,] or fraudulent; but the company may make such investigation and settlement of any claim or suit as it deems expedient.
It is understood and agreed that the company has no obligation to any insured after the applicable limits of the policy have been exhausted by payment * * *."
The trial court found that the last sentence quoted above controlled the issue that and its plain meaning established that Allied had no further obligation once it paid its entire liability limits. The term "exhausted by payment" was not defined in the contract.
As previously set forth, a court must construe the policy as a whole. A court is not to read provisions in isolation but is required to read the provisions of a contract in light of each other to determine whether an ambiguity exists. See Dash Messenger Service, Inc. v. Hartford Insurance Co. of Illinois, 221 Ill.App.3d 1007, 164 Ill.Dec. 313, 582 N.E.2d 1257, 1260 (1991). If words in the policy are susceptible to more than one reasonable interpretation, they are ambiguous. Any ambiguity in a policy must be construed against the insurance company and in favor of the insured. See Outboard Marine Corp., 154 Ill.2d at 108-109, 180 Ill.Dec. 691, 607 N.E.2d at 1212. A review of the policy language found in Allied's contract of insurance with Cowsert indicates that an ambiguity exists.
Allied focuses on use of the words "exhausted by payment" to conclude that the payment of liability limits to the court terminated Allied's obligation to defend under the policy. The trial court adopted Allied's approach and concentrated only on the last sentence of the provision. However, in interpreting the provision, we cannot disassociate the last sentence in the provision from its context. When the final sentence containing the words "exhausted by payment" is read together with the prior sentences, the entire provision's ambiguity becomes apparent.
The pertinent provision provides that the insurer will pay on behalf of the insured only those "sums which the insured shall become legally obligated to pay." (Emphasis added.) The term "legally obligated" is not defined in the policy, but its plain meaning suggests an obligation due to judgment or settlement. In support of our interpretation, we note that Black's Law Dictionary states that a legal obligation forms the basis for a judgment in a court of competent jurisdiction. Black's Law Dictionary 806 (5th ed.1971). Merely because Allied tendered its policy limits to the court does not mean that Allied was legally obligated to pay that amount, since neither a settlement had been reached nor a judgment had been entered.
Zurich Insurance Co. v. Raymark Industries, Inc., 118 Ill.2d 23, 112 Ill.Dec. 684, 514 N.E.2d 150 (1987), supports our interpretation of the phrase "legally obligated." In that case, the trial court declared that under the terms of the policies issued to Raymark Industries, Inc. (Raymark), the primary insurers were obligated to defend new claims and continue to defend the claims pending against Raymark up until the time the liability limits of those policies were exhausted by "payment of judgments and/or settlements." Zurich Insurance Co., 118 Ill.2d at 53, 112 Ill.Dec. 684, 514 N.E.2d at 163. The underlying *381 actions had been filed by individuals alleging personal injuries and wrongful death resulting from exposure to asbestos products manufactured by Raymark. Our supreme court found that a defending insurer which had exhausted its policy limits was no longer obligated to defend the insured and that the insured must tender the case to another insurer. The court in that case specifically stated as follows:
"The duty to indemnify arises only when the insured becomes legally obligated to pay damages in the underlying action that gives rise to a claim under the policy. The duty to defend an action brought against the insured, on the other hand, is determined solely by reference to the allegations of the complaint. If the complaint alleges facts which bring the claim within the potential indemnity coverage of the policy, the insurer is obligated to defend the action." (Emphasis added.) 118 Ill.2d at 52, 112 Ill.Dec. 684, 514 N.E.2d at 163.
It is clear that in a lawsuit one does not become "legally obligated" until a judgment or settlement is reached between the parties.
Moreover, a review of the contract shows that the term "exhausted by payment" is not defined by the policy and is subject to more than one interpretation. For example, Allied could have paid the policy limits to the court and interpleaded the conflicting claimants in a declaratory judgment action. It could have paid the policy limits to any one of four claimants in the underlying actions. It could have paid the policy limits in full or partial satisfaction of a judgment. It could have paid the policy limits directly to Cowsert in lieu of investigating whatever defenses might be available and let Cowsert decide what to do. Or, it could have paid the limits in return for a release for itself and its insured. See Brown v. Lumbermens Mutual Casualty Co., 326 N.C. 387, 394, 390 S.E.2d 150, 154 (1990). Certainly, several different methods of effectuating the term "exhausted by payment" exist.
Other jurisdictions that have considered similar language in an insurance contract have determined that the word "exhaust" means only payment either by settlement or judgment wholly depleting the policy amount, not simply paying the policy limits to the court. There are numerous cases from other jurisdictions which hold that an insurer cannot discharge its duty to defend by unilaterally tendering its policy limits to the court or the claimant. When an insurer merely tenders its limits, without obtaining a settlement of any claim for its insured, a strong argument exists that it has not exhausted its policy limits.
In a case from North Carolina, Brown v. Lumbermens Mutual Casualty Co., 326 N.C. 387, 390 S.E.2d 150 (1990), the duty-to-defend provision of an automobile policy that stated, "Our duty to settle or defend ends when our limit of liability for this coverage has been exhausted," was found to be ambiguous because it did not specify in what manner the limits would have to be exhausted before its duty to defend was discharged. Brown is factually similar to the case at bar. In that case, Brown, the insured, was involved in an automobile accident with a car driven by Joan Hinson. Hinson filed suit against the insured. The insurer employed counsel to defend Brown. Prior to trial, the insurer paid its policy limit of $25,000 to Hinson in partial satisfaction of Hinson's claim and stopped defending Brown. Hinson obtained a verdict against Brown for $45,000. The trial court entered judgment on that amount and credited Brown with the $25,000 payment made by the insurer. Brown then filed suit against the insurer for breach of duty to defend. The trial court entered summary judgment in favor of Brown, finding that the insurer's unilateral tender to Hinson and Hinson's acceptance of the policy limit without effectuating a settlement of Hinson's claim against Brown did not relieve the insurer of its duty to defend.
In Anderson v. United States Fidelity & Guaranty Co., 177 Ga.App. 520, 339 S.E.2d 660 (1986), similar policy language was in question. The Georgia court did not agree *382 with the insurer that the term "exhaust" encompassed the paying of policy limits to the court but interpreted it to mean the payment by way of either a settlement or a judgment wholly depleting the policy amount. See also Samply v. Integrity Insurance Co., 476 So.2d 79 (Ala.1985).
As previously observed, the policy in question contains the words "exhausted by payment" but does not define what type of payment is necessary in order to relieve Allied of its duty to defend. One reasonable interpretation is that the insurer will defend any claim and the insurer's obligation to defend will terminate only if and when the insurer's policy limits are exhausted by judgment or settlement. In support of this interpretation, we rely on Conway v. Country Casualty Insurance Co., 92 Ill.2d 388, 65 Ill.Dec. 934, 442 N.E.2d 245 (1982). In that case, our supreme court specifically stated, "[S]ince the insurer's duty to defend its insured is not dependent upon a duty to indemnify[] but arises from the undertaking to defend stated in the policy, an insurer's payment to its policy limits, without more, does not excuse it from its duty to defend." Conway, 92 Ill.2d at 394, 65 Ill.Dec. 934, 442 N.E.2d at 247. In making its determination that an insurer cannot discharge its duty to defend its insured simply by making payments to the claimant to the extent of its policy's limits, the Conway court looked to the language of the policy in issue, which provided in pertinent part, "The Company shall not be obligated to pay any claim or judgment or to defend any suit or prosecute or maintain any appeal after the applicable limits of the Company's liability have been exhausted by payment of any judgments or settlements." Conway, 92 Ill.2d at 393, 442 N.E.2d at 246-47. The Conway court found that since the insurer could terminate its obligation to defend only by payments made pursuant to a judgment or settlement, the insurer's voluntary payments to a claimant, without a release, did not discharge the insurer of its duty to defend. Conway, 92 Ill.2d at 395-96, 65 Ill.Dec. 934, 442 N.E.2d at 248.
While the inclusion of the language that exhaustion of the policy limit must be by payment of "judgments or settlements" was important to the Conway court's determination that the company's payments to the claimant did not discharge its duty to defend, the absence of such language here is not fatal to the insured's case because the relevant provision is ambiguous, and such ambiguity must be construed in the insured's favor. Moreover, a liberal reading of Conway supports the proposition that regardless of the specific language of the policy, a liability insurer may not absolve itself of its duty to defend the insured by tendering its policy limits to the court. An insurance company has a fiduciary duty to defend its insured and to consider the insured's interest. "[A]n insurer cannot simply discharge its duty to its insured simply by making payments to the claimant to the extent of its policy's limits." Conway, 92 Ill.2d at 395, 65 Ill. Dec. 934, 442 N.E.2d at 248.
There are strong public policy arguments against allowing insurers to discharge their duty to defend by paying policy limits and then leaving the insured to fend for himself. "[A] most significant protection afforded by the policythat of defenseis rendered a near nullity" if the duty to defend would terminate upon unilateral tender of policy limits. Simmons v. Jeffords, 260 F.Supp. 641, 642 (E.D.Pa. 1966).
"`[T]he insurer's duty is both to defend actions and to pay judgment against the insured. Otherwise where the damages exceed the policy coverage, the insurer could walk into court, toss the amount of the policy on the table, and blithely inform the insured that the rest was up to him. This would obviously constitute a breach of the insurer's contract to defend actions against the insured, for which premiums had been paid, and should not be tolerated by the courts.'" (Emphasis omitted.) National Casualty Co. v. Insurance Co. of North America, 230 F.Supp. 617, 622 (N.D.Ohio 1964), *383 quoting 8 Appleman, Insurance Law & Practice, § 4685.
See also Annotation, Liability insurer's duty to defend action against an insured after insurer's full performance of its payment obligations under policy, 27 A.L.R.3d 1057 (1969). These public policy arguments are compelling.

IV. CONCLUSION
In summary, we find the policy language ambiguous. Allied's tendering of its policy limits to the court without effectuating a settlement or obtaining the consent of the insured constituted a breach of its duty to defend its insured. Therefore, we find that the trial court erred in granting summary judgment in favor of Allied.
We have reviewed Allied's additional arguments and find them without merit. We particularly address Allied's contention that even assuming, arguendo, that Allied would have defended Cowsert in the underlying litigation, a judgment in excess of the policy limits would have been entered against her and financial hardships would have certainly followed. While this may be true, it simply did not discharge Allied of its duty to defend Cowsert. Douglas's suit was based on an assignment from Cowsert of any legal rights she might have against Allied for breach of its duty to defend. The only issue before this court is whether Allied was relieved of its obligation to defend Cowsert by paying the policy limits to the court. The question of damages, if any, is not before us at this time.
For the foregoing reasons, the order of the circuit court of Madison County entering summary judgment in favor of Allied is hereby reversed, and the cause is remanded for proceedings not inconsistent with this opinion.
Reversed and remanded.
RARICK and HOPKINS, JJ., concur.
