Marcus Lydell Walker, an employee of the Macon County Sheriffs Department, petitions this Court for a writ of mandamus directing the Macon Circuit Court to enter an order holding him immune from suit based on Art. I, § 14, Ala. Const.1901. Walker further asks this Court to direct the Macon Circuit Court to dismiss, pursuant to Rule 12(b)(6), Ala. R. Civ. P., the claims asserted against him by Miguel Harris.
On May 31, 2011, Harris sued the Macon County Commission, Macon County, and Walker, in both his individual and official capacities, alleging in part:
“On or about April 9, 2011, while traveling U.S. Highway 80 at or near Floyd Street in Macon County, Alabama, the Defendant, Marcus Lydell Walker, individually, and while acting within the line and scope of his employment for the Macon County Sheriffs Department, negligently and/or wantonly caused or allowed a motor vehicle he was operating, owned by Defendants Macon County, Alabama and/or Macon County Commission, to collide with a motor vehicle driven by Plaintiff, Miguel Harris. Said negligent and/or wanton conduct was a proximate cause of [Harris’s] injuries and damages hereinafter described.
“At the aforesaid time and place, the Defendant, Marcus Lydell Walker, was engaged in the regular course and scope of his employment for the Macon County Sheriffs Department. Therefore, Defendants Macon County, Alabama and/or Macon County Commission are legally responsible for the actions of Defendant Marcus Lydell Walker pursuant to the doctrine of respondeat superior, principal/agent and/or master servant.
“At the aforesaid time and place, and for sometime prior thereto, the Defendant, Macon County, Alabama and/or *749Macon County Commission, was the owner of said motor vehicle driven by Defendant, Marcus Lydell Walker, being a 2009 Ford Crown Victoria.... The Defendant, Macon County, Alabama and/or Macon County Commission, was the owner of and had the right of control over the use of the motor vehicle driven by the Defendant, Marcus Lydell Walker, and as such, had the authority to supervise the maintenance, operation, and repair of said motor vehicle. Defendants, Macon County, Alabama and/or Macon County Commission, as owner, negligently entrusted said vehicle to Defendant, Marcus Lydell Walker, who negligently or wantonly operated said vehicle injuring [Harris]. Defendants Macon County, Alabama and/or Macon • County Commission, entrusted said vehicle to the Defendant, Marcus Lydell Walker, and is therefore liable to [Harris].”
Harris’s claims against Walker and Macon County and the Macon County Commission (hereinafter referred to collectively as “the county defendants”) alleged negligence, wanton and reckless conduct, and negligent and wanton entrustment.
On July 1, 2011, Walker and the county defendants separately moved the trial court to dismiss the claims against them pursuant to Rule 12(b)(6), Ala. R. Civ. P. Walker argued that he was acting within the line and scope of his employment as a Macon County Sheriffs deputy and is, therefore, absolutely immune from suit pursuant to Art. I, § 14, Ala. Const.1901. The county defendants argued that they cannot be held vicariously liable for the tortious act of the sheriff or his deputies because the Alabama Constitution denominates sheriffs and deputies as members of the State’s executive department; they are not, the county defendants argued, county employees.
On November 80, 2011, the trial court entered an order granting the county defendants’ motion to dismiss; however, the trial court denied Walker’s motion to dismiss. The trial court made no findings of fact in its order. Harris’s attorney testified in an affidavit — presented in support of Harris’s response to Walker’s petition for the writ of mandamus — that the trial court stated at the hearing on the motions to dismiss that it was denying Walker’s motion because there existed no evidence as to whether Walker was acting in the line and scope of his duties as a sheriffs deputy at the time of the accident. The trial court reasoned:
“[A] motion to dismiss based on Rule 12(b)(6), Ala. R. Civ. P., should not be granted if there is a possibility that through discovery the parties could find evidence that [Walker] was not acting within the line and scope of [his duties] at the time of the accident such that [Harris] could possibly recover from [Walker].”
Standard of Review
“Inasmuch as the issue before us is whether the trial court correctly denied a Rule 12(b)(6), Ala. R. Civ. P., motion to dismiss, ‘[t]his Court must accept the allegations of the complaint as true.’ Creola Land Dev., Inc. v. Bentbrooke Housing, L.L.C., 828 So.2d 285, 288 (Ala.2002). Moreover, as the defendants sought only a Rule 12(b)(6) dismissal without resort to facts supplied by affidavit or other evidentiary material outside the allegations of the complaint, and as the trial court accordingly treated the motion only as what it was, a motion to dismiss and not a motion for summary judgment with eviden-tiary materials outside the allegations of the complaint, those allegations themselves are the only potential source of *750factual support for the defendants’ claims of immunity. Rule 12(b), Ala. R. Civ. P.; Mooneyham v. State Bd. of Chiropractic Examiners, 802 So.2d 200 (Ala.2001); Garris v. Federal Land Bank of Jackson, 584 So.2d 791 (Ala.1991); Hales v. First Nat’l Bank of Mobile, 380 So.2d 797 (Ala.1980).
‘““Mandamus is a drastic and extraordinary writ, to be issued only where there is (1) a clear legal right in the petitioner 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) properly invoked jurisdiction of the court.” Ex parte Integon Corp., 672 So.2d 497, 499 (Ala.1995).... Our review is further limited to those facts that were before the trial court. Ex parte American Resources Ins. Co., 663 So.2d 932, 936 (Ala.1995).’
“Ex parte National Sec. Ins. Co., 727 So.2d 788, 789 (Ala.1998).
“ ‘The appropriate standard of review under Rule 12(b)(6) is whether, when the allegations of the complaint are viewed most strongly in the pleader’s favor, it appears that the pleader could prove any set of circumstances that would entitle [him] to relief. In making this determination, this Court does not consider whether the plaintiff will ultimately prevail, but only whether [he] may possibly prevail. We note a Rule 12(b)(6) dismissal is proper only when it appears beyond doubt that the plaintiff can prove no set of facts in support of the claim that would entitle the plaintiff to relief.’
“Nance v. Matthews, 622 So.2d 297, 299 (Ala.1993) (citations omitted). Accord Cook v. Lloyd Noland Found., Inc., 825 So.2d 83, 89 (Ala.2001), and C.B. v. Bobo, 659 So.2d 98, 104 (Ala.1995). ‘We construe all doubts regarding the sufficiency of the complaint in favor of the plaintiff.’ Ex parte Haralson, 853 So.2d 928, 931 (Ala.2003). ‘[A] motion to dismiss is typically not the appropriate vehicle by which to assert ... qualified immunity or State-agent immunity and ... normally the determination as to the existence of such a defense should be reserved until the summary-judgment stage, following appropriate discovery.’ Ex parte Alabama Dep’t of Mental Health & Mental Retardation, 837 So.2d 808, 813-14 (Ala.2002).”
Ex parte Alabama Dep’t of Youth Servs., 880 So.2d 393, 397-98 (Ala.2003).
Discussion
Walker states that the complaint in this case alleges that the traffic accident occurred while he was “acting within the line and scope of his employment for the Macon County Sheriffs Department” and that at the time of the accident he “was engaged in the regular course and scope of his employment for the Macon County Sheriffs Department.” Walker argues in his petition that he is an executive officer of the State of Alabama pursuant to Art. V, § 112, Ala. Const.1901. Walker contends that, as an executive officer of the State, he is immune from suit, pursuant to Art. I, § 14, Ala. Const.1901, for money damages for actions taken while he was executing his duties as a deputy sheriff.
Harris concedes that Walker is immune from suit in his official capacity as a deputy sheriff; however, he notes that the complaint contained allegations against Walker in his individual capacity, and he argues that Walker is entitled to immunity from those claims only if he was acting within the line and scope of his duties at the time of the accident. Relying upon this Court’s decision in Ex parte Haralson, 853 So.2d 928 (Ala.2003), Harris contends that Walk*751er cannot assert immunity from claims against him in his individual capacity simply because he was operating his patrol car at the time of the accident and that Walker must put forth some evidence showing that, at the time of the accident, he was acting within the line and scope of his employment as a deputy sheriff. Harris states that the motion to dismiss was properly denied because it is entirely possible that he could prevail on his claims against Walker individually if it is shown that Walker was not acting within the line and scope of his employment at the time of the accident. Harris further contends that at this early stage of the proceeding no discovery has taken place and that he should be allowed time for discovery in order to determine whether Walker was acting within the line and scope of his employment as a deputy sheriff at the time of the accident.
This Court has stated:
“A sheriff is an executive officer of this State pursuant to the Alabama Constitution of 1901, Art. V, § 112. Parker [v. Amerson ], 519 So.2d [442,] at 443 [ (Ala.1987) ]. As an executive officer, a sheriff is immune from being sued in the execution of the duties of his office under Art. I, § 14, Alabama Const.1901. Id. at 442-48. Furthermore, a sheriff, as an employee of the State, ‘is immune from suit, in his official capacity, for negligent performance of his statutory duties.’ Alexander [v. Hatfield ], 652 So.2d [1142,] at 1143 [ (Ala.1994) ]; Parker, 519 So.2d at 442-43; Wright v. Bailey, 611 So.2d 300, 303 (Ala.1992).
“This Court has held that deputy sheriffs are immune to the same extent sheriffs are immune because ‘ “[t]he deputy sheriff is the alter ego of the sheriff.” ’ Hereford v. Jefferson County, 586 So.2d 209, 210 (Ala.1991) (quoting Mosely v. Kennedy, 245 Ala. 448, 450,17 So.2d 536, 537 (1944)). A deputy sheriff acting in his ‘official capacity] and individually’ is immune from suit when the action is one against the State. See Phillips v. Thomas, 555 So.2d 81, 83 (Ala.1989). See also Hereford, 586 So.2d at 210 (deputy sheriffs were entitled to State immunity for their actions in releasing a prisoner); see also Wright, 611 So.2d at 303 (deputy sheriffs were entitled to State immunity for their negligent failure to arrest a motorist); Drain v. Odom, 631 So.2d 971 (Ala.1994) (deputy sheriff was entitled to State immunity, in his official capacity, for actions taken in performance of his duties as deputy sheriff); Alexander, 652 So.2d at 1144 (deputy sheriff was entitled to State immunity for actions taken while ‘on duty’).”
Ex parte Haralson, 853 So.2d at 932.
In Ex parte Haralson, the plaintiff sued a sheriffs deputy seeking to recover damages as the result' of an automobile accident involving the deputy while the deputy was operating a vehicle owned by the sheriffs department. The deputy moved the trial court to dismiss the complaint against him, arguing, among other things, that he was immune from suit under § 14. The trial court denied the deputy’s motion to dismiss; he then petitioned this Court for a writ of mandamus directing the trial court to dismiss the claims against him. As Walker argues here, the deputy in Ex parte Haralson, argued in support of his petition that he was an executive officer of the State pursuant to Art. V, § 112, Alabama Constitution of 1901, and that as an executive officer he is entitled, under Art. I, § 14, to immunity from being sued. The deputy argued that this immunity extended to the execution of the duties of his office.
The plaintiff in Ex parte Haralson, argued in opposition to the deputy’s petition *752that the deputy was not entitled to immunity simply because he asserted that he was an officer of the State and that the deputy was entitled to immunity only if he was “on duty” and/or was acting within the scope of his employment at the time of the accident. The plaintiff claimed that it was not clear whether the deputy was acting under the authority of the State at the time of the accident and that, without evidence indicating that he was acting under such authority, the trial court correctly denied his motion to dismiss. Id.
This Court agreed with the plaintiff and stated:
“We cannot conclude, at this early stage of the proceedings, without evidence showing that at the time of the accident he was acting within the line and scope of his employment, that Deputy Haralson is entitled to immunity. No State officer, such as a deputy sheriff, can avoid tort liability simply by claiming that his ‘ “mere status as a [S]tate official cloaks him with the [SJtate’s constitutional immunity.” ’ Phillips [v. Thomas], 555 So.2d [81,] at 83 [(Ala.1989) ] (quoting Banes v. Dale, 530 So.2d 770, 781 (Ala.1988)); see also Mitchell [v. Davis ], 598 So.2d [801,] at 806 [ (Ala.1992) ]. It is conceivable that Griffith could prove facts that would show that at the time of the accident Deputy Haralson was on a personal errand or otherwise had departed from the line and scope of his employment. If so, Griffith ‘may possiblfy] prevail’ on her claims. See Nance [v. Matthews ], 622 So.2d [297,] at 299 [(Ala.1993)]. Given the question presented by this mandamus petition — whether the trial court should have dismissed Griffith’s claims against Deputy Haralson on the ground that he is entitled to State immunity — we conclude that Deputy Har-alson has not shown that he has “‘a clear legal right ... to the order sought.” ’ [Ex parte ] Butts, 775 So.2d [173] at 178 [ (Ala.2000) ] (quoting Ex parte United Serv. Stations, Inc., 628 So.2d [501] at 503 [ (Ala.1993) ]).”
Ex parte Haralson, 853 So.2d at 933.
We find the facts presented in this petition to be distinguishable from those in Ex parte Haralson and more akin to those presented in Ex parte Blankenship, 893 So.2d 303 (Ala.2004), a case relied on by Walker. In Ex parte Blankenship, the plaintiff sued a sheriffs deputy seeking to recover damages arising from an automobile accident between the plaintiffs vehicle and a vehicle being driven by the deputy. The complaint specifically alleged that the deputy was an employee of the sheriffs department and that at the time and place of the accident the deputy was “ ‘performing his duties as a Deputy Sheriff.’ ” 893 So.2d at 305. The deputy moved the trial court to dismiss the claims against him, arguing that he was entitled to absolute immunity pursuant to § 14. The trial court denied the motion to dismiss.
The deputy petitioned this Court for a writ of mandamus, again arguing that he was immune from liability pursuant to § 14. This Court agreed, stating:
“Where it is undisputed that a deputy sheriff is ‘acting within the line and scope of his employment ... at the time [he is involved in an automobile] accident’ with the plaintiff, § 14, Ala. Const. 1901, bars an action against the deputy sheriff for damages arising out of the accident. Ex parte McWhorter, 880 So.2d [1116,] at 1117 [ (Ala.2003) ]. This is so, because an action against a sheriff — or a deputy sheriff — for damages arising out of the performance of his duties is ‘ “essentially a suit against the state.” ’ Parker v. Amerson, 519 So.2d 442, 445 (Ala.1987) (quoting Montiel v. Holcombe, 240 Ala. 352, 354,199 So. 245, *753245 (1940)); accord Drain v. Odom, 631 So.2d 971, 972 (Ala.1994) (‘deputy sheriffs are immune to the same extent as sheriffs’).
“Here, it is alleged in the complaint and admitted in the answer that Deputy Blankenship was acting in the line and scope of his duties at the time of the accident. Of course, in reviewing a motion to dismiss, the Court ‘ “must accept the allegations of the complaint as true.” ’ Ex parte Alabama Dep’t of Youth Servs., 880 So.2d 393, 397 (Ala.2003) (emphasis added) (quoting Creóla Land Dev., Inc. v. Bentbrooke Housing, L.L.C., 828 So.2d 285, 288 (Ala.2002)). Thus, an action against Deputy Blankenship based on this complaint is barred by § 14, and the trial court erred in denying the motion to dismiss.”
Ex parte Blankenship, 893 So.2d at 305.
Here, Harris specifically alleged in his complaint, not once but twice, that Walker was acting within the line and scope of his employment with the Macon County Sheriffs Department at the time of the accident. Harris alleged in the complaint that at the time of the accident Walker was “acting within the line and scope of his employment” and “was engaged in the regular course and scope of his employment for the Macon County Sheriffs Department.” There are no allegations in the complaint that Walker had deviated from the normal scope of his duties as an employee of the Macon County Sheriffs Department at the time of the accident. It is a well established rule “ ‘ “that a party is bound by what it states in its pleadings.” ’ ” Ex parte Blankenship, 893 So.2d at 306 (quoting Help at Home, Inc. v. Medical Capital, L.L.C., 260 F.3d 748, 753 (7th Cir.2001)). Further, we “must accept the allegations of the complaint as true.” Creola Land Dev., Inc. v. Bentbrooke Housing, L.L.C., 828 So.2d 285, 288 (Ala.2002). Because Harris himself alleged in the complaint that Walker was “acting within the line and scope of his employment” as a deputy sheriff and “was engaged in the regular course and scope of his employment for the Macon County Sheriffs Department” at the time of the accident, Walker is immune from suit pursuant to § 14.
Conclusion
Walker has demonstrated a clear legal right to the relief sought. Therefore, we grant the petition for a writ of mandamus and direct the Macon Circuit Court to dismiss the claims asserted against Walker.
PETITION GRANTED; WRIT ISSUED.
MALONE, C.J., and WOODALL, STUART, PARKER, SHAW, MAIN, and WISE, JJ., concur.