
930 So.2d 497 (2005)
Ex parte Bryan DAVIS.
(In re Lewis Earl Cain
v.
Conecuh County Commission et al.).
1040514.
Supreme Court of Alabama.
November 18, 2005.
*498 Daryl L. Masters and Gary L. Willford, Jr., of Webb & Eley, P.C., Montgomery, for petitioner.
Everette A. Price, Jr., Brewton, for respondent.
SEE, Justice.
Bryan Davis, a deputy sheriff for Conecuh County, petitions this Court for a writ of mandamus directing the trial court to grant Deputy Davis's motion to dismiss Lewis Earl Cain's claims against him on the basis that Deputy Davis is entitled to State immunity. We grant the petition and issue the writ.

I.
Because we are reviewing a trial court's ruling on a motion to dismiss, we treat the allegations in Cain's complaint as true. See Creola Land Dev., Inc. v. Bentbrooke Housing, L.L.C., 828 So.2d 285, 288 (Ala.2002)("In considering whether a complaint is sufficient to withstand a motion to dismiss, this Court must accept the allegations of the complaint as true."). Cain asserts that Deputy Davis and another sheriff's deputy known as "Rich" drove onto Cain's property on March 3, 2003; according to Cain, they were not in "hot pursuit" and did not have a warrant or any other legal authority to come onto his property. Deputy Davis was looking for Cain's son. Cain asked Deputy Davis to leave his property unless he had a search warrant. Although they did not immediately produce a search warrant, Deputy Davis and Rich nonetheless remained on Cain's property and searched inside a Chevrolet pickup truck and a Chevrolet Lumina automobile. When Cain objected to the deputies' searching the pickup truck and the automobile without first producing a search warrant, Deputy Davis pushed Cain to the ground, handcuffed him, and placed him in the back of a Conecuh County Sheriff's Department car. As a result of Deputy Davis's actions, Cain suffered injuries to his back, shoulder, and wrists. Deputy Davis also confiscated Cain's pocketknife and Berretta brand pistol. While Cain sat in the sheriff's car, an unknown person arrived with a search warrant. Deputy Davis and Rich then seized the pickup truck and the automobile and took Cain to the Conecuh County jail.
The State charged Cain with resisting arrest and obstructing governmental operations; however, at the close of the State's *499 case, the trial court directed the entry of a judgment of acquittal on each charge.[1] After the entry of the judgments of acquittal, Cain filed a "Notice of Claim" with the Conecuh County Commission seeking the return of his personal property, but the confiscated items have not been returned.
Cain sued Deputy Davis in his official and individual capacities, alleging false imprisonment, assault and battery, the tort of outrage, wantonness, negligence, trespass, conversion, and various civil-rights violations. Cain also sued the Conecuh County Commission, the Conecuh County Sheriff's Department, and Sheriff Tracey Hawsey, alleging civil-rights violations and negligent hiring, supervising, and retaining in regard to Deputy Davis because of Deputy Davis's alleged ignorance of the law, his lack of experience and training, and his lack of knowledge of the correct procedures for making arrests.
The action was removed to federal district court, where the Commission, the sheriff's department, Sheriff Hawsey, and Deputy Davis moved to dismiss Cain's claims against them on the basis of sovereign immunity. The federal district court dismissed all of Cain's claims against the Commission, the sheriff's department, and Sheriff Hawsey, as well as Cain's claims brought against Deputy Davis in his official capacity; it remanded Cain's claims against Deputy Davis in his individual capacity to the Conecuh Circuit Court.
On August 19, 2004, Deputy Davis moved the Conecuh Circuit Court to dismiss Cain's remaining claims on the ground that he is immune from liability for monetary damages under Art. I, § 14, Constitution of Alabama 1901. The trial court denied Deputy Davis's motion to dismiss. Deputy Davis then answered Cain's complaint and moved the trial court to reconsider his motion to dismiss based on State immunity. After the circuit court refused to reconsider his motion, Deputy Davis petitioned this Court for a writ of mandamus.

II.
The writ of mandamus is an extraordinary legal remedy. Ex parte Mobile Fixture & Equip. Co., 630 So.2d 358, 360 (Ala.1993). Therefore, this Court will not grant mandamus relief unless the petitioner shows: (1) a clear legal right to the order sought; (2) an imperative duty upon the trial court to perform, accompanied by its refusal to do so; (3) the lack of another adequate remedy; and (4) the properly invoked jurisdiction of the Court. See Ex parte Wood, 852 So.2d 705, 708 (Ala.2002).
Deputy Davis petitions this Court for a writ of mandamus directing the circuit court to dismiss the remaining counts of Cain's complaint against him on the basis of State immunity. Davis argues that he is entitled to immunity under Art. I, § 14, Const. of Ala.1901, because, he says, Cain's remaining claims seek to recover monetary damages for acts Deputy Davis performed while he was working within the line and scope of his employment as a deputy sheriff for the State of Alabama. "[I]f an action is an action against the State within the meaning of § 14, such a case `presents a question of subject-matter jurisdiction, which cannot be waived or conferred by consent.'" Haley v. Barbour County, 885 So.2d 783, 788 (Ala.2004) (quoting Patterson v. Gladwin Corp., 835 So.2d 137, 142-43 (Ala.2002)). "Therefore, a court's failure to dismiss a case for lack of subject-matter jurisdiction *500 based on sovereign immunity may properly be addressed by a petition for the writ of mandamus." Ex parte Alabama Dep't of Mental Health & Retardation, 837 So.2d 808, 810-11 (Ala.2002).

III.
Article I, § 14, Const. of Ala.1901, states that "the State of Alabama shall never be made a defendant in any court of law or equity." "The wall of immunity erected by § 14 is nearly impregnable," Patterson, 835 So.2d at 142, and bars
(1) claims against the State,[2]
(2) claims against a State agency,[3]
(3) claims against a state official or employee sued in his official capacity as an agent for the State,[4] and
(4) claims against a state official or employee sued in his individual capacity.[5]
The remaining counts of Cain's complaint allege that Deputy Davis, in his individual capacity, is liable for monetary damages.
Notwithstanding this Court's language in Patterson, "[s]ection 14 does not necessarily immunize State officers and agents from individual civil liability." Gill v. Sewell, 356 So.2d 1196, 1198 (Ala.1978). Whether immunity serves as a defense to an action against a state officer or employee sued in his individual capacity depends upon the degree to which the action involves a State interest. "Our cases adhere to the view that the State has an interest such as will prohibit suit against the State official or employee where the action is, in effect, against the State." Taylor v. Troy State Univ., 437 So.2d 472, 474 (Ala.1983).
When determining whether a State interest in an action against a state official or employee in his or her individual capacity is sufficient to trigger the immunity granted by § 14, our cases distinguish between the standards applied to those state agents or employees whose positions exist by virtue of legislative pronouncement and those who serve as the constitutional officers of this State. We have held that State-agent immunity may bar an action against a state agent or employee under the principles announced in Ex parte Cranman, 792 So.2d 392 (Ala.2000). See Ex parte Butts, 775 So.2d 173 (Ala.2000)(adopting, by majority, the Cranman restatement of the rule governing State-agent immunity). However, this Court has consistently held that a claim for monetary damages made against a constitutional officer in the officer's individual capacity is barred by State immunity whenever the acts that are the basis of the alleged liability were performed within the *501 course and scope of the officer's employment. See, e.g., Boshell v. Walker County Sheriff, 598 So.2d 843, 844 (Ala.1992)("a sheriff, as an executive officer of the State of Alabama, is immune, under Article I, § 14, of the Alabama Constitution, from suit based on state law claims arising out of the execution of the duties of his office").
"In general, the acts of the deputy sheriff are the acts of the sheriff." Mosely v. Kennedy, 245 Ala. 448, 450, 17 So.2d 536, 537 (1944). Thus, "it is logical that those acts should enjoy the same immunity covering the sheriff's own acts." Carr v. City of Florence, 916 F.2d 1521, 1526 (11th Cir.1990). Accordingly, "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."'" Ex parte Blankenship, 893 So.2d 303, 305 (Ala.2004)(quoting Parker v. Amerson, 519 So.2d 442, 445 (Ala.1987), quoting in turn Montiel v. Holcombe, 240 Ala. 352, 354, 199 So. 245, 245 (1940)).
Section 36-22-3(4), Ala.Code 1975, provides:
"It shall be the duty of sheriffs in their respective counties, by themselves or deputies, to ferret out crime, to apprehend and arrest criminals and, insofar as within their power, to secure evidence of crimes in their counties and to present a report of the evidence so secured to the district attorney or assistant district attorney for the county."
The essence of Cain's complaint is that Deputy Davis is liable for monetary damages because, Cain alleges, he failed to comply with the proper procedures for conducting a search and in performing an arrest. Conducting searches and performing arrests fall within the statutory duties of a sheriff, and § 36-22-3(4), Ala.Code 1975, authorizes the sheriff to entrust the performance of those duties to a deputy sheriff.
Cain does not allege that Deputy Davis's actions were undertaken for some personal motive to further some personal interest and not as a part of his duties as a deputy sheriff. Instead, in his answer to Deputy Davis's mandamus petition, Cain concedes that Deputy Davis came to his property on March 3, 2003, "during the course of his duties." Because "uncontroverted averments of fact stated in an answer [to a mandamus petition] should be taken as true," Ex parte Sharpe, 513 So.2d 609, 610 (Ala.1987), Cain's claims against Deputy Davis are barred by the doctrine of State immunity.
"Under Article I, § 14, of the Alabama Constitution of 1901, the only exceptions to the sovereign immunity of sheriffs are actions brought
"`(1) to compel him to perform his duties, (2) to compel him to perform ministerial acts, (3) to enjoin him from enforcing unconstitutional laws, (4) to enjoin him from acting in bad faith, fraudulently, beyond his authority, or under mistaken interpretation of the law, or (5) to seek construction of a statute under the Declaratory Judgment Act if he is a necessary party for the construction of the statute.'"
Alexander v. Hatfield, 652 So.2d 1142, 1143 (Ala.1994) (quoting Parker v. Amerson, 519 So.2d at 443). Cain does not seek injunctive or declaratory relief for the actions he alleges were beyond Deputy Davis's authority. Therefore, none of the exceptions to State immunity apply to this case. See Alexander v. Hatfield; Karrick v. Johnson, 659 So.2d 77 (Ala.1995).[6] Accordingly, *502 we grant Deputy Davis's petition for the writ of mandamus and direct the circuit court to dismiss the remaining counts of Cain's complaint.
PETITION GRANTED; WRIT ISSUED.
NABERS, C.J., and HARWOOD, WOODALL, STUART, SMITH, BOLIN, and PARKER, JJ., concur.
LYONS, J., concurs in the result.
NOTES
[1]  The applicability of the exclusionary rule under these circumstances is not at issue in this case.
[2]  See Ex parte Tuscaloosa County, 796 So.2d 1100, 1103 (Ala.2000) ("Under Ala. Const. of 1901, § 14, the State of Alabama has absolute immunity from lawsuits.").
[3]  See Tuscaloosa County, 796 So.2d at 1103 ("This absolute immunity extends to arms or agencies of the state ...."); accord Ex parte Franklin County Dep't of Human Res., 674 So.2d 1277, 1279 (Ala.1996)("Under this provision, the State and its agencies have absolute immunity from suit in any court.").
[4]  See Lyons v. River Road Constr., Inc., 858 So.2d 257, 261 (Ala.2003)("The State cannot be sued indirectly by suing an officer in his or her official capacity when a judgment against the officer would directly affect the financial status of the State treasury."); accord Burgoon v. Alabama State Dep't of Human Res., 835 So.2d 131, 133 (Ala.2002)("State agents enjoy absolute immunity from suit in their official capacities.").
[5]  See Milton v. Espey, 356 So.2d 1201, 1202 (Ala.1978)("The prohibition of Section 14 cannot be circumvented by suing the official or agent individually."); accord Phillips v. Thomas, 555 So.2d 81, 83 (Ala.1989)("State officers and employees, in their official capacities and individually, are also absolutely immune from suit when the action is, in effect, one against the State.").
[6]  Cain argues that his claims fall within an exception to State immunity because the facts alleged in his complaint show that Deputy Davis's actions were beyond Davis's legal authority. See Ex parte Cranman, 792 So.2d 392, 405 (Ala.2000)("a state agent shall not be immune from civil liability in his or her personal capacity ... when the State agent acts... beyond his or her authority"). Deputy Davis's immunity, however, is derived from the performance of his responsibilities as an adjunct to a constitutional officer of this State. Thus, State-agent immunity and its exceptions are not applicable. See Ex parte Purvis, 689 So.2d 794, 795-96 (Ala.1997) (refusing to apply the exceptions to State-agent immunity to claims made against a constitutional officer).
