
946 So.2d 450 (2006)
Ex parte The ESTATE OF Johnny REYNOLDS and Charles Cole.
(In re Marquez Miles
v.
The Estate of Johnny Reynolds and Charles Cole).
1041533.
Supreme Court of Alabama.
June 9, 2006.
*451 B. Saxon Main and Gerald C. Swann, Jr., of Ball, Ball, Matthews & Novak, P.A., Montgomery, for petitioners.
Kenneth J. Mendelsohn, Thomas E. James, and Ellenann B. Yelverton of Jemison, Mendelsohn & James, P.C., Montgomery, for respondent.
SMITH, Justice.
Charles Cole, a defendant in an action pending in the Bullock Circuit Court, petitions for a writ of mandamus directing Judge Bernard Smithart of the Bullock Circuit Court to enter a summary judgment in his favor on the basis of State-agent immunity. The estate of Johnny Reynolds also petitions for a writ of mandamus directing Judge Smithart to enter a summary judgment in its favor on the basis that Johnny Reynolds was entitled to State-agent immunity. We grant the petition and issue the writ.

Facts and Procedural Background
On June 5, 2002, Marquez Miles was driving along U.S. Highway 82 in Bullock County near mile marker 195. Miles stated in a deposition that as he was driving through a curve, his tires left the roadway, and he was unable to return to the roadway.[1] Miles's vehicle left the road, struck a mailbox, and collided with a tree. As a result of the collision, Miles suffered extensive personal injuries.
On September 26, 2002, Miles sued Johnny Reynolds, who was employed by the Alabama Department of Transportation ("ALDOT") as district engineer of *452 ALDOT's District II, sixth division, which encompasses Bullock County, and Charles Cole, who is the district maintenance superintendent for District II. The complaint essentially alleged that Reynolds and Cole, in their personal capacities, negligently and wantonly failed to inspect, maintain, and repair the area of Highway 82 in which the collision occurred. Miles alleged that he was injured as a result of their negligence and wantonness.[2] Miles later amended the complaint to allege that Reynolds had negligently and wantonly supervised Cole and that both Reynolds and Cole had acted negligently, wantonly, willfully, maliciously, fraudulently, in bad faith, beyond their authority, and under a mistaken interpretation of the law.
In January 2005, Reynolds died, and apparently Reynolds's estate was substituted as a party. The parties have not informed this Court of the name of the executor of Reynolds's estate (the executor of Reynolds's estate and Reynolds's estate will be hereinafter referred to as "Reynolds").
On April 4, 2005, Reynolds and Cole filed a motion for a summary judgment. On June 2, 2005, the trial court denied the motion. Cole and Reynolds now petition this Court for a writ of mandamus directing the trial court to enter a summary judgment in their favor on the basis of State-agent immunity.
Standard of Review
"`While the general rule is that the denial of a motion for summary judgment is not reviewable, the exception is that the denial of a motion for summary judgment grounded on a claim of immunity is reviewable by petition for writ of mandamus.' Ex parte Rizk, 791 So.2d 911, 912 (Ala.2000). A writ of mandamus is an extraordinary remedy available only when there is: `(1) a clear legal right to the order sought; (2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; (3) the lack of another adequate remedy; and (4) the properly invoked jurisdiction of the court.' Ex parte BOC Group, Inc., 823 So.2d 1270, 1272 (Ala. 2001)."
Ex parte Nall, 879 So.2d 541, 543 (Ala. 2003).
This Court has established a "burden-shifting" process when a party raises the defense of State-agent immunity. Giambrone v. Douglas, 874 So.2d 1046, 1052 (Ala.2003). In order to claim State-agent immunity, a State agent bears the burden of demonstrating that the plaintiff's claims arise from a function that would entitle the State agent to immunity. Giambrone, 874 So.2d at 1052; Ex parte Wood, 852 So.2d 705, 709 (Ala.2002). If the State agent makes such a showing, the burden then shifts to the plaintiff to show that the State agent acted willfully, maliciously, fraudulently, in bad faith, or beyond his or her authority. Giambrone, 874 So.2d at 1052; Wood, 852 So.2d at 709; Ex parte Davis, 721 So.2d 685, 689 (Ala. 1998). "A State agent acts beyond authority and is therefore not immune when he or she `fail[s] to discharge duties pursuant to detailed rules or regulations, such as those stated on a checklist.'" Giambrone, 874 So.2d at 1052 (quoting Ex parte Butts, 775 So.2d 173, 178 (Ala.2000)).

Discussion
Reynolds and Cole argue that, as employees of ALDOT, Johnny Reynolds and Cole are entitled to State-agent immunity *453 under the test set forth in Ex parte Cranman, 792 So.2d 392 (Ala.2000).[3] Because Johnny Reynolds and Cole are entitled to State-agent immunity, Reynolds and Cole argue, the trial court erred in failing to enter a summary judgment in their favor. We agree.
"State-agent immunity protects state employees, as agents of the State, in the exercise of their judgment in executing their work responsibilities." Ex parte Hayles, 852 So.2d 117, 122 (Ala.2002). In Cranman, this Court restated the rule governing State-agent immunity:
"A State agent shall be immune from civil liability in his or her personal capacity when the conduct made the basis of the claim against the agent is based upon the agent's
"(1) formulating plans, policies, or designs; or
"(2) exercising his or her judgment in the administration of a department or agency of government, including, but not limited to, examples such as:
"(a) making administrative adjudications;
"(b) allocating resources;
"(c) negotiating contracts;
"(d) hiring, firing, transferring, assigning, or supervising personnel; or
"(3) discharging duties imposed on a department or agency by statute, rule, or regulation, insofar as the statute, rule, or regulation prescribes the manner for performing the duties and the State agent performs the duties in that manner; or
"(4) exercising judgment in the enforcement of the criminal laws of the State, including, but not limited to, law-enforcement officers' arresting or attempting to arrest persons; or
"(5) exercising judgment in the discharge of duties imposed by statute, rule, or regulation in releasing prisoners, counseling or releasing persons of unsound mind, or educating students.
"Notwithstanding anything to the contrary in the foregoing statement of the rule, a State agent shall not be immune from civil liability in his or her personal capacity
"(1) when the Constitution or laws of the United States, or the Constitution of this State, or laws, rules, or regulations of this State enacted or promulgated for the purpose of regulating the activities of a governmental agency require otherwise; or
"(2) when the State agent acts willfully, maliciously, fraudulently, in bad faith, beyond his or her authority, or under a mistaken interpretation of the law."
792 So.2d at 405.
The evidence submitted in support of the summary-judgment motion indicated that Johnny Reynolds, as district engineer, was generally responsible for assessing the highway-improvement needs of District II, which includes 593 "lane" miles of road, 3 miles of bridges, and 2 rest areas. He frequently inspected the highways to discover defects and to determine if maintenance or repair work was required. Additionally, Johnny Reynolds supervised maintenance and construction activities within District II. When maintenance or repair work was necessary, Johnny Reynolds would rank and prioritize projects based on the degree of danger a condition created, the type of work needed, the availability of labor resources, and the particular road in question. In performing *454 his duties, Johnny Reynolds used ALDOT's "Maintenance Manual" and "Field Operations Manual" ("the manuals").
The evidence presented in support of the summary-judgment motion also indicated that Cole, as district superintendent for District II, inspected the highways in District II and determined whether maintenance and repair was needed. If he determined such work was necessary, he was generally responsible for planning, scheduling, monitoring, supervising, and evaluating the work, as well as supervising ALDOT employees. Cole testified in an affidavit and by deposition that his job is to determine what kind of maintenance work is necessary and to rank and prioritize projects based on the degree of danger a condition created, the type of work needed, the availability of labor resources, and the particular road in question. Cole also used and consulted the manuals in performing his duties. The manuals, however, often do not provide explicit guidelines for particular situations, and Cole stated that he exercises judgment in deciding how best to accomplish his responsibilities.
Reynolds and Cole argue that this Court's decision in Grant v. Davis, 537 So.2d 7 (Ala.1988), requires that they be afforded State-agent immunity in this case. In Grant, the plaintiffs, Davis and Ingersoll, were traveling on Highway 49 south of Dadeville. The right rear tire of the motor vehicle in which they were riding slid off the road into a rut or drop-off on the shoulder. Davis, who was driving, attempted to guide the vehicle back onto the road, but she lost control, and the vehicle crashed. Both Davis and Ingersoll were injured.
Subsequently, Davis and Ingersoll sued several ALDOT employees, including Lorenzo Grant, the district engineer for the district in which the crash occurred, and Wood Gaston, the district superintendent.[4] The plaintiffs alleged that Grant and Gaston were negligent, reckless, or wanton in failing to properly inspect, maintain, or repair the shoulder of the road on which the accident occurred. Grant and Gaston moved for a summary judgment on the ground that they were immune from suit. The trial court denied their motion, and they appealed.
The evidence demonstrated that Grant was responsible for all construction and maintenance activities within his district. He would inspect the roads with Gaston to determine if any repairs, construction, or maintenance was necessary. Both would prioritize the repair projects. A month before the accident, Gaston had ordered certain repairs be conducted in the area of Highway 49 in which the plaintiffs crashed.
This Court determined that Grant and Gaston were immune from suit. In arriving at that determination, we applied the "discretionary function test":
"Discretionary function immunity is just what its label implies: immunity from tort liability afforded to public officials acting within the general scope of their authority in performing functions that involve a degree of discretion. . . .
"In Bell v. Chisom, 421 So.2d 1239, 1241 (Ala.1982), this Court discussed at length the elements of, and factors for determining, the applicability of discretionary function immunity in a given case:

*455 "`As the Restatement's comments suggest, the courts have at times found the discretionary function standard difficult to interpret. Nevertheless, in many cases this standard's proper application will be readily apparent. Two such cases will serve to illustrate the conflicting policy considerations the courts must apply. On the one hand, in DeStafney [v. University of Alabama, 413 So.2d 391 (Ala.1981)] itself we had no difficulty in rejecting the immunity claim of the individual defendant, an aide at the University day care center who allegedly allowed the plaintiff's child to fall off playground equipment. This defendant's function clearly required due care rather than difficult decision making. On the other hand, we accepted the claim of immunity in Gill v. Sewell, [356 So.2d 1196 (Ala.1978)], where the director of a work release center was sued for his decision to release a convicted felon who shot the plaintiff. That decision was an exercise of discretion central to the defendant's function, and accordingly in DeStafney we noted, "unquestionably, Gill falls squarely within § 895D(3)(a) of the Restatement," 413 So.2d at 394.
"`These two cases illustrate the governmental interest at stake in discretionary function immunity: the ability of public officers to "engage in making a decision by weighing the policies for and against it." Restatement, supra, comment d at 413. Without some degree of immunity, public officers may decide not on the basis of policy but of avoiding personal liability or vexatious suits. Their motive for doing so may be larger than in the private sector, for governmental action often has unusual potential to injure or to affect large numbers of people. See G. Bermann, "Integrating Governmental and Officer Tort Liability," 77 Columbia L.Rev. 1175, 1177 (1977). Discretionary function immunity, then, is called for when necessary to preserve the decision making function of government.
"`Considerable precedent has developed applying the concept of discretionary function in various contexts. The most common approach to the problem is to distinguish between planning and operational levels of action, with only the former being immune. . . . '"
Grant, 537 So.2d at 8-9.
We noted in Grant that the evidence established that once Grant or Gaston determined that repairs to a roadway were needed, they were required to rank the various projects based on factors that included the type of defect, the particular road in question, and the resources and manpower available. While those duties required that they maintain and repair the roads, Grant and Gaston exercised discretion in prioritizing the various projects. We stated:
"Ideally, the slightest defect would be repaired immediately so that the highways would, at all times, be maintained at the greatest level of safety. Reality, however, poses limitations on the time, manpower, and financial resources available for making the needed repairs. It is under these limitations that the defendants must assess the relative priority to be given the various defects that are discovered, and rank their repair so as to achieve the optimum level of safety possible under all circumstances. While [ALDOT's] `Field Operations Manual' provides criteria by which these decisions are to be made, in the final analysis a significant degree of discretion is left to the defendants in their exercise of *456 this particular function. We find that the appellants' duties associated with the repair and maintenance function substantially partake of planning level activities involving the exercise of discretion, and the defendants are therefore entitled to substantive immunity as a matter of law on plaintiffs' claims for failure to maintain and repair. . . .
"We also find that the same is true with respect to the claim that the defendants were negligent in failing to properly inspect the shoulder of the road and discover the defect. Both the `Maintenance Manual' and the `Field Operations Manual,' publications adopted to guide [ALDOT] workers in the performance of their duties, mandate frequent inspection of the roads to discover defects. . . .
"The duty to inspect the roads is an affirmative duty but one that also involves a type of discretion giving rise to qualified immunity. In performing that function, the defendants are involved in determining the manner of carrying out these inspections, i.e., determining the method and means. Thus, they are carrying out the directives of the guidelines that they must follow by determining how the inspections are to be carried out. While the defendants have no discretion not to inspect, they do have the discretion to determine the practical method for inspecting each road. . . . "
Grant, 537 So.2d at 9-10 (first two emphases added). See also McDuffie v. Roscoe, 679 So.2d 641 (Ala.1996) (holding that various ALDOT engineers and inspectors sued for negligently allowing a dangerous drop-off to exist on the shoulder of a road were entitled to discretionary-function immunity under Grant); Taylor v. Shoemaker, 605 So.2d 828 (Ala.1992) (holding that the defendant ALDOT engineers and a superintendent who were responsible for assessing highway-improvement needs and determining how best to allocate resources exercised discretion in determining to not remove railway rails surrounding a railroad-crossing signal; therefore, they were immune from liability in a suit by an individual who had crashed into the rails); and McCluskey v. McCraw, 672 So.2d 805 (Ala. Civ.App.1995) (upholding a trial court's decision that a county engineer who was required to inspect bridges had discretion to determine the practical method for such inspections and was afforded discretionary-function immunity in an action that alleged that the engineer was liable for unsafe conditions on a bridge).
Grant was decided before the adoption of the restatement of the rule of State-agent immunity first described in Cranman. However, Reynolds and Cole argue that the holding in Grant fits within the criteria described in Cranman. Specifically, Reynolds and Cole argue that Cole's and Johnny Reynolds's duties required that they formulate plans and policies for highway maintenance and repair, that they exercise judgment in "allocating [the] resources" of ALDOT, and that they exercise judgment in supervising ALDOT personnel. Cranman, 792 So.2d at 405. We agree.
As noted in Cranman, not all discretionary acts by an agent of the State should be labeled as "`immune' simply because the State has empowered the agent to act." 792 So.2d at 405. However, the conduct of Johnny Reynolds and Cole in performing their duties in this case was not remote from the execution of government policy. Id. Johnny Reynolds and Cole planned both inspections and repairs, and they exercised judgment in determining how and where to use the limited resources and manpower available to repair and maintain roads and bridges in District II. These decisions are the very sort protected by State-agent immunity as *457 described in Cranman. Therefore, Johnny Reynolds and Cole are entitled to immunity.
Miles argues that State-agent immunity is unavailable to Johnny Reynolds and Cole because they "failed to discharge duties pursuant to detailed rules or regulations, such as those stated on a checklist." Ex parte Butts, 775 So.2d at 178. Specifically, Miles argues that Johnny Reynolds and Cole failed to maintain the road in the manner prescribed in the manuals, which Miles contends required Johnny Reynolds and Cole to inspect Highway 82 and to ensure that the shoulders were maintained to provide drivers a reasonably safe recovery zone. They did not, he argues, have discretion to disobey the manuals. Miles included in opposition to the summary-judgment motion two affidavits of Charles L. Cook, who served as the acting district engineer for District II from March 1998 to September 1999. In the first affidavit, dated November 1, 2002, Cook testified that he had inspected Highway 82 and had noticed that there were "numerous places" where the pavement and shoulder had been damaged by large trucks getting too close to the shoulder of the road. Cook further stated that he noticed such damage in an area "not far from Mr. J.T. Knowles'[s] house" (Mr. Knowles owned the mailbox that was damaged in the crash). In the second affidavit, dated April 12, 2005, Cook testified that he had inspected the shoulder of Highway 82 in September 2002. Cook noticed that some areas of the shoulder were higher than the paved surface of the road, some areas were lower, and that in one place a truck had apparently made a large rut in the shoulder. Cook stated that he saw some of these problems "near mileage marker 195." Cook also stated that it appeared to him these conditions had existed for some time. Miles argues that this evidence demonstrates that Johnny Reynolds and Cole were negligent in inspecting and maintaining Highway 82.
Reynolds and Cole argue that Cook's affidavits were due to be stricken by the trial court because they were not based on personal knowledge and because they contain speculation and opinion.[5] In any event, in Grant, this Court noted that although ALDOT's "Field Operations Manual" provided criteria by which decisions were made and set out duties the defendants were required to perform, "in the final analysis a significant degree of discretion is left to the defendants in their exercise, of this particular function. . . . [T]he appellants' duties associated with the repair and maintenance function substantially partake of planning level activities involving the exercise of discretion. . . ." 537 So.2d at 9. Additionally, although the manuals required ALDOT workers to make frequent inspections of the roads to discover defects, the workers nonetheless were required to make judgments in performing this duty:
"The duty to inspect the roads is an affirmative duty but one that also involves a type of discretion giving rise to qualified immunity. In performing that function, the defendants are involved in determining the manner of carrying out these inspections, i.e., determining the method and means. Thus, they are carrying out the directives of the guidelines that they must follow by determining how the inspections are to be carried out. While the defendants have no discretion not to inspect, they do have the *458 discretion to determine the practical method for inspecting each road. . . . "
537 So.2d at 10.
Similarly, Johnny Reynolds's and Cole's duties to inspect required formulating plans and policies, as well as exercising judgment in allocating resources for the inspections. Johnny Reynolds and Cole then exercised judgment in actually undertaking to accomplish the necessary maintenance and repairs. This type of decision-making is protected by Cranman. Therefore, Miles failed to establish that Johnny Reynolds and Cole are not entitled to immunity.
Finally, Miles argues that under Cranman no immunity is afforded when a State agent "acts willfully, maliciously, fraudulently, in bad faith, beyond his or her authority, or under a mistaken interpretation of the law." 792 So.2d at 405. However, we see no evidence indicating that Johnny Reynolds or Cole acted in this manner.

Conclusion
Johnny Reynolds and Cole are entitled to State-agent immunity under the test set forth in Cranman. The trial court is therefore directed to enter a summary judgment in favor of Cole and the estate of Johnny Reynolds.
PETITION GRANTED; WRIT ISSUED.
NABERS, C.J., and LYONS, WOODALL, and PARKER, JJ., concur.
NOTES
[1]  Miles's complaint alleges that the right front tire of his motor vehicle entered a "channel in the paved surface of the road," causing him to lose the ability to steer. Miles testified at deposition that he did not see a problem with the surface of the road; instead, his tire rolled off the roadway and he was unable to turn back onto the road. The state trooper who investigated the accident, Arthur S. Berry, testified in an affidavit that there were no channels or ruts in the road surface or on the shoulder.
[2]  The complaint also sought damages from DaimlerChrysler Corporation, the manufacturer of the motor vehicle Miles was driving. DaimlerChrysler was dismissed from the case in December 2003 and is no longer a party in the proceedings.
[3]  Cranman was a plurality opinion. The test set forth in Cranman was subsequently adopted by a majority of the Court in Ex parte Butts, 775 So.2d 173, 178 (Ala.2000).
[4]  ALDOT is referred to in Grant as the "Alabama Highway Department," the name by which ALDOT was formally known. See Lamar Adver. of Montgomery, Inc. v. State Dep't of Transp., 694 So.2d 1256, 1257 (Ala.1996) ("[T]he Alabama Highway Department [is] now known as the Alabama Department of Transportation. . . ." (parentheses omitted)).
[5]  Reynolds and Cole state that they filed a motion to strike the affidavits but that the trial court never ruled on the motion.
