
592 So.2d 597 (1991)
Ex parte Kenneth HIRSCH, et al.
(Re Kenneth HIRSCH, et al. v. ALABAMA STATE DOCKS DEPARTMENT, et al.)
1901016.
Supreme Court of Alabama.
November 15, 1991.
*598 Richard H. Taylor of Jackson & Taylor, P.C., and Richard G. Alexander of Alexander and Associates, Mobile, for petitioners.
Charles L. Miller, Jr., Thomas H. Benton, Jr. and Victor H. Lott, Jr. of Lyons, Pipes & Cook, P.C., Mobile, for respondents.
KENNEDY, Justice.
Former employees of the Alabama State Docks Department ("Docks Department") filed a class action, Rule 23, A.R.Civ.P., against the Docks Department; John Dutton, as director of the Docks Department; and Robert M. Hope, Larry R. Downs, and Frank C. Daniels, as trustees of the Hourly Paid Alabama State Docks Department Workers Retirement Plan and Trust. The trial court certified two classes of plaintiffs, then entered summary judgment for all the defendants against both classes of plaintiffs on all their claims. The Court of Civil Appeals affirmed, Hirsch v. Alabama State Docks Department, 592 So.2d 595 (Ala.1991), and we granted certiorari review. There are no issues before the Court concerning the propriety of the class certifications.
On November 30, 1987, the activities of the Mobile wharves and warehouses division of the Docks Department were transferred to the Mobile Steamship Association. Apparently because of that transfer, the employees of the wharves and warehouses division were terminated on that day.
On May 1, 1987, the Mobile coal-handling facility of the Docks Department laid off 38 employees because of a lack of business. Although the laid-off employees were eligible to be recalled, only two were recalled.
While these Docks Department employees worked for either the wharves and warehouses division or the coal-handling facility, it is undisputed that the International Longshoremen's Association, Local 1984 (the "Union"), was their collective bargaining representative with the Docks Department. The Union and the Docks Department entered into an agreement concerning pension benefits. Section 6.2 of that agreement provided:

"TERMINATION OF THE PLAN
"While it is the intention of the parties hereto to maintain the plan and trust permanently, the employer and trustee reserve the right to terminate the plan, the trust, or both, in whole or in part in the event the Local 1984, International Longshoremen's Association, AFL/CIO ceases to be the collective bargaining agent for the employees of the employer.
"In the event of the termination of the plan for any reason, the rights of all affected employees to benefits accrued to the date of such termination, to the extent then funded, shall be nonforfeitable. Upon the occurrence of such event, the assets of the trust fund, to the extent necessary to fully fund said vested rights, shall be allocated among the participants or their beneficiaries in accordance with the plan or any amendments to the plan adopted prior to each allocation."
The agreement further provided at Article 17:

"ARTICLE XVII

"RETIREMENT
"Section I
"Any active hourly employee who has worked an average of one thousand (1,000) hours each year for the department for fifteen (15) consecutive years and who has been declared eligible for *599 retirement benefits by the U.S. SOCIAL SECURITY ADMINISTRATION shall be entitled to a pension of two hundred ($200.00) dollars per month.
"Section II
"Any active employee who having worked for the department an average of one thousand (1,000) hours each year for twenty (20) or more consecutive years and who has been declared eligible for retirement benefits by the U.S. SOCIAL SECURITY ADMINISTRATION shall be entitled to a pension of three hundred ($300.00) dollars per month.
"Section III
"Any employee or former employee who having worked for the department an average of one thousand (1,000) hours each year for twenty-five (25) or more consecutive years and who has been declared eligible for retirement benefits by the U.S. SOCIAL SECURITY ADMINISTRATION shall be entitled to a pension of four hundred and fifty ($450.00) dollars per month.
"Section IV
"The department will maintain an actuarially sound retirement fund covering its employees."
The Hourly Paid Alabama State Docks Department Workers Retirement Plan and Trust ("pension fund") was created to administer those negotiated pension benefits; accordingly, the plaintiffs named its trustees as defendants. The pension fund is funded entirely by the Docks Department based upon an actuarial computation of the demographic makeup of the hourly workers who will be eligible for benefits from the fund; neither the plaintiffs nor any other hourly worker contributed any money to the pension fund. Although the Docks Department has not paid the plaintiffs any benefits from the pension fund, it is undisputed that the pension fund remains in existence and that other Docks Department employees may obtain benefits from that fund.
One of the classes of plaintiffs in this action, to which the complaint refers as the "class I plaintiffs," claims that its members are entitled to pension benefits pursuant to the provisions set out above. Specifically, the class I plaintiffs claim that under Article 6.2 of the agreement the Union "ceased to be" their collective bargaining unit when they were terminated, so that the pension fund is partially terminated, and that they are, thus, according to them, entitled to pension benefits.
The Union and the Docks Department also entered into an agreement, effective April 2, 1986, concerning group insurance. It stated:

"ARTICLE XVIII

"INSURANCE
"Section I
"The department shall maintain in full force and effect during the term of this agreement group health, life, accident, and dental insurance as provided for herein.
"Section II
"A new employee shall be eligible for full insurance coverage as provided for in this article when he has been credited with seven hundred and fifty (750) hours. It is understood that the qualifying period may cover more than one but not more than two calendar years and will be effective when credit for seven-hundred and fifty (750) hours is earned.
"Section III
"Employees will receive credit for eight (8) hours a day, even if he has not actually worked eight (8) hours, if his absence is due to an on-the-job injury. Employees will receive credit for eight (8) hours for each day lost as a result of a non-job related injury or sickness resulting in hospitalization not to exceed thirty (30) working days on presentation of supporting evidence of such hospitalization. To remain qualified for insurance the employee must earn a minimum of 750 hours in each calendar year after he has first qualified.
"Section IV
"The health insurance provided by the Department shall at a minimum contain the following features:

*600 "The health insurance shall provide coverage for eligible employees and their dependents of major medical expenses after a $100.00 calendar year deductible per person with a maximum of $200.00 per family."
The Union and the Docks Department entered into a second agreement concerning medical insurance, although the effective date of that agreement is unclear from the record.[1] That agreement provided:
"An eligible employee who desires to cover eligible dependents under this program is required to pay 28% of the monthly dependent premium as established each year at renewal. Covered dependents will be eligible under the same benefit plan with the exception of life insurance which shall be as follows:


"Eligible Spouse ............... $5,000.00
"Eligible Dependent Child....... $1,000.00

"(Six (6) months and over)
"If an employee elects not to insure his eligible dependents and later desires to do so, that employee may insure his eligible dependents subject to acceptable evidence of insurability and coverage will include a pre-existing conditions provision."
Accordingly, the difference in the two agreements concerning medical insurance is that the second agreement required a 28% copayment by the employee for medical insurance for dependents.
The class II plaintiffs make various claims, which we describe in more detail presently, for medical insurance benefits.
The defendants filed a motion for summary judgment in which they argued that the plaintiffs could not maintain this action against them because of the doctrine of sovereign immunity. The plaintiffs admitted that the defendants normally have sovereign immunity, but they argued that this action fell within one of the exceptions to that doctrine. The trial court's order entering summary judgment for all the defendants simply stated:
"[I]t appearing to the Court that there is no genuine issue of material fact with respect to all Plaintiffs' claims against the Defendants and summary judgment is due to be granted in favor of the Defendants as a matter of law; and it further appearing that there is no just reason for delay of the entry of this Judgment;
"It is therefore, ORDERED, ADJUDGED AND DECREED, that Defendants' Motion for Summary Judgment is hereby granted.... This Judgment is a final determination of all claims asserted by the plaintiffs in this action...."
The Court of Civil Appeals, in affirming the trial court's judgment, wrote:
"The appellants contend that the trial court erred in granting the summary judgment on the premise that this action falls within one of the recognized exceptions to the doctrine of sovereign immunity. Appellants further contend that certain individually named ASD [Docks Department] officials have a legal duty created by a trust agreement which they failed to perform. They requested that these officials be compelled to perform certain duties and ministerial acts with regard to the appellants' retirement benefits....
"....
"Our careful review of the record reveals that the appellees' motion for summary judgment was submitted with supporting affidavits of certain ASD officials and supporting briefs. It was (and is) the appellees' position that the appellants' claims should be dismissed under the doctrine of sovereign immunity....
"....
"The appellants' opposition to the motion included a letter brief and an affidavit of Kenneth Ronald Hirsch, which reaffirmed and verified the allegations in the complaint as his sworn testimony. They argued that the action they brought fell within the exceptions to the doctrine of sovereign immunity because *601 they were seeking to have the court construe the law and compel the ASD officials to perform ministerial acts....
"....
"Our review of the record shows that ASD made a prima facie showing that there was no genuine issue as to any material fact, and that they were entitled to a judgment as a matter of law. The appellants failed to set forth any facts showing that there was a genuine issue for trial."
592 So.2d at 595-597.
Against this background, we address the Court of Civil Appeals' affirmance of the trial court's summary judgment. The law concerning summary judgments is well established. The standard used to determine the propriety of a summary judgment is found in Rule 56(c), A.R.Civ.P.:
"The judgment sought shall be rendered forthwith if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show 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."
The burdens placed on the parties by the rule have often been described:
"The burden is on one moving for summary judgment to demonstrate that no genuine issue of material fact is left for consideration by the jury. The burden does not shift to the opposing party to establish a genuine issue of material fact until the moving party has made a prima facie showing that there is no such issue of material fact. Woodham v. Nationwide Life Ins. Co., 349 So.2d 1110 (Ala. 1977); Shades Ridge Holding Co. v. Cobbs, Allen & Hall Mortg. Co., 390 So.2d 601 (Ala.1980); Fulton v. Advertiser Co., 388 So.2d 533 (Ala.1980)."
Stephens v. City of Montgomery, 575 So.2d 1095, 1097 (Ala.1991), quoting Schoen v. Gulledge, 481 So.2d 1094, 1096-97 (Ala.1985).
In order to rebut a prima facie showing that there is no genuine issue of material fact, the nonmovant must show the existence of a genuine issue of material fact by "substantial evidence," Ala.Code 1975, § 12-21-12, which has been defined as "evidence of such weight and quality that fair-minded persons in the exercise of impartial judgment can reasonably infer the existence of the fact sought to be proved." West v. Founders Life Assurance Co. of Florida, 547 So.2d 870, 871 (Ala.1989). In determining whether there is substantial evidence, we review the evidence in the light most favorable to the nonmovant and resolve all reasonable doubts against the movant. Stephens, at 1097; Sanders v. Kirkland & Co., 510 So.2d 138 (Ala.1987).
Finally, a trial court's ruling on a summary judgment motion is a nondiscretionary ruling, and no presumption of correctness attaches to that ruling; accordingly, our review of the evidence properly presented in the record is de novo. Hightower & Co. v. United States Fidelity & Guaranty Co., 527 So.2d 698 (Ala.1988).
Within that framework of the law of summary judgments, we address the summary judgment on the class I plaintiffs' claims. The defendants had the burden of producing a prima facie case indicating that they were protected by sovereign immunity. It is undisputed that they did so. The class I plaintiffs do not attempt to rebut the defendants' prima facie showing; indeed, the class I plaintiffs state that the defendants are normally protected by sovereign immunity. No doubt, as a proposition of law, the defendants are normally protected by sovereign immunity. Art. I, § 14, 1901 Constitution of Alabama; Jones v. Alabama State Docks, 443 So.2d 902 (Ala.1983).
The class I plaintiffs, however, contend that their action falls within a category of actions that are not prohibited by § 14 of the 1901 Constitution and thus is not prohibited by the doctrine of sovereign immunity. In Taylor v. Troy State University, 437 So.2d 472, 474 (Ala.1983), the Court set out certain categories of actions that do not come within the prohibitions of § 14:
"(1) actions brought to compel State officials to perform their legal duties; (2) *602 actions brought to enjoin State officials from enforcing an unconstitutional law; (3) actions to compel State officials to perform ministerial acts; and (4) actions brought under the Declaratory Judgment Act seeking construction of a statute and its application in a given situation."
The class I plaintiffs argue that their action is an action brought to compel the performance of a legal duty. As we stated earlier, the class I plaintiffs claim that under Article 6.2 of the agreement between the Union and the Docks Department, the Union "ceased to be" their collective bargaining unit when they were terminated, so that the pension fund is partially terminated, and that they are, thus, according to them, entitled to pension benefits; accordingly, the class I plaintiffs argue, their action is an action brought to compel the performance of a legal dutythe duty to pay them the pension benefits. We must examine the record carefully to determine if the class I plaintiffs have produced substantial evidence to overcome defendants prima facie case that defendants were protected by sovereign immunity. We focus in this instance particularly on whether the class I plaintiffs have proved the existence of a legal duty, because if the defendants owe no legal duty to the class I plaintiffs then the class I plaintiffs cannot properly characterize this action as an action to compel the performance of such a duty. The class I plaintiffs' argument that their action falls within a category of actions not prohibited by § 14would, accordingly, fail.
Section 6.2 of the agreement states:

"TERMINATION OF THE PLAN
"While it is the intention of the parties hereto to maintain the plan and trust permanently, the employer and trustee reserve the right to terminate the plan, the trust, or both, in whole or in part in the event the Local 1984, International Longshoremen's Association, AFL/CIO ceases to be the collective bargaining agent for the employees of the employer.
"In the event of the termination of the plan for any reason, the rights of all affected employees to benefits accrued to the date of such termination, to the extent then funded, shall be nonforfeitable. Upon the occurrence of such event, the assets of the trust fund, to the extent necessary to fully fund said vested rights, shall be allocated among the participants or their beneficiaries in accordance with the plan or any amendments to the plan adopted prior to each allocation."
(Emphasis added).
Section 6.2 provides that the employer and the trustee reserve the right to partially terminate the pension plan if the union "ceases to be the collective bargaining agent" for the workers. Based primarily on that language, the class I plaintiffs make their claim we described earlier. Section 6.2, however, further provides that if the plan is terminated, the rights of the employees to the benefits accrued to the date of such termination are not forfeitable and that if there is such a termination, the assets of the trust fund to the extent necessary to fund fully "said vested rights" will be distributed to the participants or their beneficiaries. There is no provision in the agreement that defines "benefits accrued" or "vested rights," but, as we have set out earlier, there are explicit provisions concerning who is entitled to receive the pension fund benefits: employees who have worked for the Docks Department for 1,000 hours a year for 15 or more consecutive years and who have been declared eligible for retirement benefits by the United States Social Security Administration.
Thus, Section 6.2, on its face, when it states that employees' rights to the benefits accrued are not forfeitable and that the assets of the pension fund to the extent necessary to fully fund the employees' vested rights are to be distributed, refers to benefits payable to employees who are entitled to receive benefits from the pension fund, that is, employees who have, in the words of the agreement, "vested rights" in that fund. The class I plaintiffs produce no evidence contrary to this conclusion, although, without supporting evidence, *603 they deny that the conclusion is correct.
The class I plaintiffs admitted at oral argument that none of them had "vested rights" in the pension fund. Although six of the class I plaintiffs fulfilled the requirement of working an average of 1,000 hours a year for 15 or more consecutive years, those six have not been declared eligible for retirement benefits by the United States Social Security Administration; the Docks Department acknowledged at oral argument that those six will be entitled to the pension benefits when they are declared eligible for retirement benefits by the United States Social Security Administration. Nevertheless, at present, none of the class I plaintiffs has fulfilled all the requirements to be entitled to the pension fund benefits. Accordingly, we hold that the class I plaintiffs failed to prove that the defendants had a legal duty to pay them benefits from the pension fund. The class I plaintiffs' contention that the action is an action "to compel State officials to perform their legal duties," Taylor v. Troy State University, therefore fails. Consequently, the class I plaintiffs failed to prove that their action was within one of the categories of actions not prohibited by § 14.
Although we do not necessarily agree with all of the language in the Court of Civil Appeals' opinion concerning its judgment as to the class I plaintiffs, the Court of Civil Appeals did not commit reversible error in holding that the doctrine of sovereign immunity protected the defendants as to the claims of the class I plaintiffs. As to that holding and that class of plaintiffs, the judgment is due to be affirmed.
The class II plaintiffs make a variety of claims in relation to medical insurance benefits.[2] As they argued with regard to the class I plaintiffs, the defendants argue that they are protected from the action by the doctrine of sovereign immunity, and the class II plaintiffs state that the defendants are normally protected by sovereign immunity. The class II plaintiffs, like the class I plaintiffs, contend that their action is an action to compel state officials to perform their legal duties, Taylor v. Troy State University, 437 So.2d at 474, and, accordingly, is within one of the categories of actions not prohibited by § 14. Id.
The agreements concerning medical insurance benefits seem to indicate that the class II plaintiffs, if they were entitled to medical insurance benefits, would have been entitled to them until December 31, 1988. That appears undisputed. The primary basis of disagreement is whether the class II plaintiffs must pay for their dependents' insurance. As the documents set out earlier indicated, one agreement, effective April 2, 1986, guaranteed that the medical insurance for dependents would be paid; a later agreement required the employees to make a 28% copayment of medical insurance premiums for dependents. The class II plaintiffs claim, among other things, damages for breach of contract (1) for medical insurance premiums paid by the class II plaintiffs for their dependents, and (2) for losses caused by the denial of dependents' medical insurance claims where the denial was proximately caused by the defendants' failure to pay the medical insurance premium.
In support of their claims, the class II plaintiffs produced the documents described above, and they also produced evidence indicating that they met the contractual requirements to be entitled to the medical insurance benefits. Accordingly, the class II plaintiffs presented a prima facie case indicating that their action was an action to enforce a legal duty, and the Court of Civil Appeals erred when it determined that the class II plaintiffs' action was barred by sovereign immunity. That same evidence substantially supports the plaintiffs' underlying claims.
The defendants make two arguments in response. First, they argue that the class II plaintiffs failed to file grievances with the Union's local chapter and that the class II plaintiffs thus failed to exhaust their *604 administrative remedies under the agreement; accordingly, they contend that the class II plaintiffs cannot bring this action. Second, they argue that the class II plaintiffs' claims are improperly based on the terms of the agreement in effect immediately prior to their termination; the defendants contend that the class II plaintiffs are bound by the later agreement that involves the 28% copayment for dependents, because, they say, the Union's representatives continued to represent the class II plaintiffs after they were terminated. In support of that contention, the defendants cite several federal cases.
However meritorious the defendants' arguments may turn out to be when addressed in their complete factual background, the record will not support a summary judgment for the defendants on the class II plaintiffs' claims. Comparing the class II plaintiffs' evidence with the evidence offered by the defendants in support of their arguments, particularly the second argument, we hold that as to the class II plaintiffs' claims there exist genuine issues of material fact, suitable for a jury's determination. The trial court erred when it entered the summary judgment for the defendants on the class II plaintiffs' claims, and the Court of Civil Appeals erred in affirming that judgment.
In summary, the judgment of the Court of Civil Appeals as to the class I plaintiffs is due to be affirmed, but as to the class II plaintiffs that judgment is due to be reversed and the cause remanded.
AFFIRMED IN PART; REVERSED IN PART; AND REMANDED.
HORNSBY, C.J., and MADDOX, SHORES, ADAMS, HOUSTON, and INGRAM, JJ., concur.
STEAGALL, J., concurs in part and dissents in part.
STEAGALL, Justice (concurring in part and dissenting in part).
I agree with the dissent of then-Chief Justice Heflin and Justice Jones in Avondale Mills v. Saddler, 292 Ala. 134, 139, 290 So.2d 173, 176-77 (1974), in which they stated, in part:
"Contributions by an employer, as here, to a Retirement Trust are part of wages earned and withheld for later payments and may be analogized to pro rata rights of employees to vacation and severance pay, for which they have not been permitted to qualify completely by the closing of their place of employment without fault of the employees. Lucas v. Seagrave, D.C., 277 F.Supp. 338 [(D.C.Minn.1967) ]."
I, therefore, respectfully dissent from that part of the judgment and opinion relating to the class I plaintiffs. I concur in that part of the judgment and opinion relating to the class II plaintiffs.
NOTES
[1]  The effective date is shown at some places in the record as December 1, 1987, and in other places as December 1, 1988.
[2]  None of the parties indicates, nor does the record explain, whether the class II plaintiffs contend that the trustees of the pension fund are liable for their claims. For all that appears to this Court, the trustees seem to be defendants only as to the class I plaintiffs' claims.
