
99 Ill. App.3d 433 (1981)
425 N.E.2d 429
CHICAGO & EASTERN ILLINOIS RAILROAD COMPANY et al., Plaintiffs-Appellees,
v.
RESERVE INSURANCE COMPANY et al., Defendants-Appellants.
No. 80-367.
Illinois Appellate Court  First District (5th Division).
Opinion filed May 29, 1981.
Rehearing denied September 16, 1981.
Jay A. Canel and Don E. Glickman, both of Chicago (Rudnick & Wolfe, of counsel), for appellants.
Leonard M. Ring, of Chicago (Leonard M. Ring & Associates, of counsel), for appellees.
Judgment reversed.
Mr. JUSTICE LORENZ delivered the opinion of the court:
Plaintiff, Chicago & Eastern Illinois Railroad Co. (C & E), filed a complaint for declaratory judgment which prayed for a declaration that the railroad did not breach the provisions of its insurance policies and thus, that the defendants (Lexington Insurance Co., Midland Insurance Co., California Union Insurance Co., Signal Insurance Co., Yosemite Insurance Co., and Northwestern Fire Insurance Co. of Pennsylvania) are not entitled to reimbursement of $2,375,000 which the insurers paid to *434 help settle a personal injury action which had been brought against their insured  the C & E. The complaint also sought a declaration that the insurers were obligated to pay the railroad for the attorneys' fees and expenses incurred in defending against the personal injury claim. Judgment was entered declaring that: (1) the railroad did not breach its insurance policies, and (2) the insurers were obligated to pay C & E $73,688.36 as reimbursement for litigation expenses.
The controlling issues on appeal are (a) whether it was an abuse of discretion for the trial court to grant declaratory judgment, and (b) whether the insurers were obligated to provide a defense in the personal injury case.
The underlying tort action arose on January 11, 1975, at about 9:45 p.m., when a C & E train collided with a car driven by William Jordan, Jr., and turned Jordan, an 18-year-old college student, into a quadriplegic with paralyzed vocal cords.
Each of C & E's insurance policies provides that:
"The Assured shall be responsible for the settlement or defense of any claim made or suit brought or proceeding instituted against the Assured which no other insurer is obligated to defend. The Assured shall use due diligence and prudence to settle all such claims and suits which in the exercise of sound judgment should be settled, provided, however, that the Assured shall make no settlement for any sum in excess of the retained limit without approval of the Underwriters. When in the judgment of Underwriters an occurrence may involve damages in excess of the retained limit or deductible or the limit of other insurance, Underwriters may elect at any time to participate with the Assured and any other insurer in the investigation, settlement and defense of all claims and suits in connection therewith." (Emphasis added.)
Jordan's initial complaint sought $5,000,000 from C & E and its engineer based on negligence. C & E's house counsel entered an appearance on behalf of the railroad and its employee. The alleged damages exceeded the railroad's $500,000 deductible, and an attorney retained by the insurers entered an additional appearance.
The collision occurred in Chicago at the 97th Street crossing of tracks owned by the Chicago and Western Indiana R.R. Co. (C & W). Pretrial discovery revealed that there had been 13 other collisions between trains and motor vehicles at the 97th Street crossing in the prior 5 years. Not only was the C & W aware of these prior collisions, but it received repeated complaints about the dangerousness of the crossing, and was aware of newspaper articles about the problem. One of Jordan's expert witnesses reported that the crossing violated several regulations and standards and was one of the most dangerous he ever studied. Because of a restricted *435 view, motorists could easily mistake a train light for a street light. And, although flashing lights and gates were necessary to protect the public, the only safety devices at the crossing to warn motorists of approaching trains were non-reflectorized crossbucks. Discovery also revealed that one of the 13 other collisions included an accident which occurred two weeks before the January 11 collision and involved the same engineer who was operating the train that crushed William Jordan, Jr. Moreover, on the 11th, when the train was backing up at 25 m.p.h., the C & E engineer saw a car in front of Jordan's cross the tracks, and he allegedly called out to the conductor, "Did we get him?"
Based on this newly revealed evidence, Jordan filed an amended complaint seeking $5,000,000 in compensatory and $5,000,000 in punitive damages, based on negligence and wilful and wanton misconduct, from both the C & E and C & W railroads, and from various railroad employees.
Under an 1890 trackage agreement, the C & E was obligated to indemnify the C & W for all claims against the C & W which arose out of C & E's use of C & W tracks. Since the C & E insurance policies provided that the insurers would indemnify C & W for all sums which the railroad became legally obligated to pay as damages because of personal injury, it was possible that the action against C & W was within the coverage of the C & E policies. But the insurers began to question whether they would be obligated to provide indemnification for an award of punitive damages against either railroad. It became apparent to the parties that there was a potential conflict of interests between the C & E and its insurers. The basis for the conflict is that if the insurers were not liable for an award of punitive damages, and they controlled C & E's defense in the Jordan case, the insurers could benefit  at the expense of the insured  from a verdict that the railroads were guilty of wilful and wanton misconduct, but not guilty of negligence. (The converse conflict of interests is the concern of the present action: if the insured controls the defense and there is a judgment for the tort plaintiff, the insured would benefit from a verdict finding it guilty of misconduct which is clearly within the policy coverage, that is, guilty of negligence, but not guilty of wilful and wanton misconduct.) Because the insurers had a potential conflict of interests, the attorney they retained withdrew his appearance, though the insurers reserved their contractual rights to approve any settlement in excess of the retention limit.
A new attorney was retained by the railroads to defend them and their employees. Just before the Jordan trial was scheduled to start, the new defense attorney reached an agreement with Jordan's attorney in which Jordan dismissed C & W and dropped the wilful and wanton count against C & E. In return, the C & E agreed to admit its liability for *436 negligence, although liability was not admitted on behalf of the C & E employees. They were kept in the case as defendants, but it was agreed that the jury would not be informed that the employees were parties to the case.
The insurers raise the following contentions: The purpose of this deal was to eliminate the possibility that there would be an award which might not be covered by C & E's insurance policies. The reason for keeping the C & E employees in the case, as the only party defendants who denied liability, was to permit Jordan's attorney to introduce evidence of misconduct which would be immaterial to a case where the sole question was the amount of damages.
According to the insurers, there would have been an award of punitive damages if the wilful and wanton counts went to a jury with all the available evidence of misconduct. Thus, the insurers conclude that the effect of the agreement with Jordan's attorney would have been to produce a compensatory award which would have been inflated with elements of punitive damages.
When the insurers were presented with the deal as a fait accompli on the day trial was to commence, they agreed to contribute $2,375,000 toward a $3,000,000 settlement of Jordan's case. But the insurers reserved the right to seek reimbursement from C & E based on breach of policy provisions and violation of a duty to deal with the insurers in good faith.
Knowing that the insurers were preparing an action for reimbursement, C & E raced to the courthouse first and filed the complaint in this case. The railroad also obtained an order enjoining the insurer's from filing any other actions based on these occurrences in any other courts. We vacated this injunction in a prior appeal. Chicago & Eastern Illinois R.R. Co. v. Reserve Insurance Co. (1978), 59 Ill. App.3d 206, 376 N.E.2d 1.
The insurers filed their action for reimbursement in the United States District Court for the Northern District of Illinois, Eastern Division, but the State action went to trial first.

OPINION
Under the Illinois declaratory judgment statute (Ill. Rev. Stat. 1977, ch. 110, par. 57.1) the grant or denial of declaratory relief is discretionary. (Howlett v. Scott (1977), 69 Ill.2d 135, 370 N.E.2d 1036.) The trial court's exercise of this discretion is subject to searching appellate review and is not given the same deference as is the trial court's exercise of discretion in other contexts. (Hanes Corp. v. Millard (D.C. Cir.1976), 531 F.2d 585.) Independent review is justified because the exercise of the trial court's discretion in granting or denying declaratory relief is not dependent upon *437 factors which are difficult for an appellate tribunal to review, such as, for example, factual determinations of credibility.
In the present case, the trial court exercised its discretion by granting declaratory relief for a plaintiff which sought a declaration that it was not liable to the defendants for its past conduct. But, as the Illinois Supreme Court held in Howlett v. Scott:
"Normally, a declaration of nonliability for past conduct is not a function of the declaratory judgment statute (see Cunningham Brothers, Inc. v. Bail (7th Cir.1969), 407 F.2d 1165, 1169, cert. denied (1969), 395 U.S. 959, 23 L.Ed.2d 745, 89 S.Ct. 2100; Hanes Corp. v. Millard (D.C. Cir. 1976), 531 F.2d 585), for in those cases a potential defendant's institution of a declaratory action deprives the potential plaintiff of his right to determine whether he will file, and, if so, when and where." 69 Ill.2d 135, 143.
This is exactly what occurred in this case. The primary purpose of declaratory judgment is to permit a plaintiff to obtain a declaration of its rights and liabilities before proceeding with a course of conduct for which it might later be held liable to the defendant. (Cunningham Brothers, Inc. v. Bail (7th Cir.1969), 407 F.2d 1165, 1167-68; see also Ill. Ann. Stat., ch. 110, par. 57.1, Historical and Practice Notes at 128 (Smith-Hurd 1968).) But C & E did not seek a declaration that it would not incur liability for a future course of conduct; it sought a declaration that its past conduct did not breach certain insurance policies. And, it is relevant that when the railroad found out that the insurers were preparing an action for reimbursement, it rushed to file first (and obtained the injunction which was vacated in the first appeal). Such conduct "deprives the [potential] plaintiff of his traditional choice of forum and timing, and it provokes a disorderly race to the courthouse." Hanes Corp. v. Millard (D.C. Cir.1976), 531 F.2d 585, 593.
 1 C & E argues that Howlett is not controlling because the holding we referred to above was given by the supreme court as an alternative basis for its decision. Since this alternative holding was an independent basis for the Howlett decision, we conclude that it constitutes stare decisis and is controlling precedent.
C & E seeks to distinguish Cunningham on the basis that it was a personal injury case which required resolution of questions of fact, whereas, plaintiff claims, there are no disputed facts in this case. The argued distinction is not persuasive because it ignores the rationale for concluding that it is generally an abuse of discretion to grant declaratory relief relating to nonliability for past conduct: such proceedings deprive an aggrieved party of the right to decide if, when, and where to file an action to redress the wrong which it allegedly suffered.
*438 The railroad seeks to distinguish Hanes because, although the court held that declaratory relief was not appropriate when the plaintiff sought a declaration that it was not liable for breach of contract because of past conduct, the court also held that it was proper to grant declaratory relief on the question of the validity and scope of an expired patent. Plaintiff's argument is not persuasive because the D.C. Circuit Court's holding on the patent issue was based on its conclusion that the general inappropriateness of declaratory relief for questions of nonliability for past conduct was outweighed by a strong countervailing Federal policy of having questions concerning patents resolved by Federal courts.
 2 We conclude that it was an abuse of discretion to grant declaratory relief on the issue of whether C & E breached the provisions of its insurance policies.
The remaining issue concerns the finding that the insurers are obligated to reimburse C & E for the money it spent defending itself in the Jordan case. The insurance policies provide that: "The Assured shall be responsible for the defense or settlement of any claim made or suit brought or proceeding instituted against the Assured which no other insurer is obligated to defend." Furthermore, under these policies, the insurers merely had the right to "participate with the Assured" in the defense. Despite these provisions, the trial court's findings state:
"3. That a conflict developed between the insured and the insurers in connection with the handling of the Jordan claim.
4. That because of the conflict, the insurance carrier had a duty to defend but not a right to conduct the defense." (Emphasis added.)
 3 We find no basis for disregarding the contract language and imposing upon the insurers a duty to defend the insured which the insurers did not undertake in the insurance policies. The fact that the insurers had conflicts of interest which precluded them from participating in the defense of the Jordan case does not mean that the insurers became obligated to pay for the defense which the insured was contractually obligated to provide for itself.
C & E argues that, as a practical matter, the attorney retained by the insurers to "participate" in the defense would actually control the insured's defense. Plaintiff also contends that the attorney retained by the insurer was, in fact, in charge of the defense before he withdrew his appearance. But, even if this is true, it does not relieve the railroad of its contractual obligations.
Plaintiff's reliance on Maryland Casualty Co. v. Peppers (1976), 64 Ill.2d 187, 355 N.E.2d 24, and Thornton v. Paul (1978), 74 Ill.2d 132, 384 N.E.2d 335, is misplaced, because these are cases in which the insurers were contractually obligated to both indemnify and defend their insureds.
*439 We conclude that there is no basis for holding that the insurers are obligated to pay C & E for the expenses the railroad incurred in defending the claim against it.
For the preceding reasons the judgment of the circuit court is reversed.
Reversed.
MEJDA and WILSON, JJ., concur.
