
36 So.3d 504 (2009)
Ex parte State of Alabama.
(In re STATE of Alabama v. William D. CORNELIUS III and Billy W. Thompson, Colbert County Revenue Commissioner).
1080927.
Supreme Court of Alabama.
October 23, 2009.
*505 Jim R. Ippolito, Jr., chief counsel, and Jason A. Trippe, asst. counsel, Alabama Department of Transportation; and William Tipton Johnson, Jr., deputy atty. gen., Tuscumbia, for petitioner.
William D. Cornelius IV, Tuscumbia, for respondent William D. Cornelius III.
BOLIN, Justice.
The State of Alabama petitions this Court for a writ of mandamus directing the Colbert Circuit Court to enter an order dismissing, on the basis of sovereign immunity, the counterclaim for inverse condemnation filed by William D. Cornelius III.

I. Background
On January 25, 2008, the State, acting by and through the Alabama Department of Transportation, filed in the Colbert Probate Court a petition for condemnation of a portion of property owned by Cornelius and on which Colbert County claimed a lien for ad valorem taxes.[1] Cornelius filed an answer. Ultimately, the Colbert Probate Court entered a judgment condemning the property. Cornelius appealed to the Colbert Circuit Court.
On February 23, 2009, Cornelius filed a motion in the Colbert Circuit Court to amend his answer filed in the probate court to assert a counterclaim against the State alleging inverse condemnation. The State moved to dismiss the inverse-condemnation *506 claim based on the constitutional immunity of the State. See Ala. Const. 1901, § 14 ("the State shall never be made a defendant in any court of law or equity"). Without conducting a hearing, the Colbert Circuit Court denied the State's motion to dismiss Cornelius's inverse-condemnation claim, allowing the claim to stand. The State then filed this petition for a writ of mandamus requesting this Court to enter an order, directing the Colbert Circuit Court to dismiss Cornelius's inverse-condemnation claim. This Court ordered the parties to limit their arguments to the issue of sovereign immunity. We grant the petition and issue writ.

II. Standard of Review
"A writ of mandamus is an extraordinary remedy, and it `will be issued only when 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 United Serv. Stations, Inc., 628 So.2d 501, 503 (Ala.1993)."
Ex parte Butts, 775 So.2d 173, 176 (Ala. 2000). This Court has held that "a petition for a writ of mandamus is an appropriate means for seeking review of an order denying a claim of immunity." 775 So.2d at 176.

III. Discussion
In its brief to this Court, the State, relying primarily on Ex parte Alabama Department of Transportation, 978 So.2d 17 (Ala.2007) ("Good Hope"), argues that the Colbert Circuit Court had no alternative but to dismiss the inverse-condemnation claim because the claim was solely against the State. See Ex parte Carter, 395 So.2d 65, 68 (Ala.1980) (actions for inverse condemnation are to be "brought against State officials in their representative capacity").
In regard to suing a State agency, this Court in Good Hope stated:
"This Court has long held that `"`the circuit court is without jurisdiction to entertain a suit against the State because of Sec. 14 of the Constitution.'"' Larkins v. Department of Mental Health & Mental Retardation, 806 So.2d 358, 364 (Ala.2001)(quoting Alabama State Docks Terminal Ry. v. Lyles, 797 So.2d 432, 435 (Ala.2001), quoting in turn Aland v. Graham, 287 Ala. 226, 229, 250 So.2d 677, 678 (1971)). `[A]n action contrary to the State's immunity is an action over which the courts of this State lack subject-matter jurisdiction.'
". . . .
"This Court has repeatedly held that § 14, Ala. Const.1901, `affords the State and its agencies an "absolute" immunity from suit in any court.' Haley v. Barbour County, 885 So.2d 783, 788 (Ala. 2004); see also Ex parte Mobile County Dep't of Human Res., 815 So.2d 527, 530 (Ala.2001)(`Pursuant to § 14, Ala. Const, of 1901, the State of Alabama and its agencies have absolute immunity from suit in any court.'); 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. This absolute immunity extends to arms or agencies of the state....'). This absolute immunity from suit also bars suits for relief by way of mandamus or injunction. Ex parte Troy Univ., 961 So.2d 105, 110 (Ala.2006)."
Good Hope, 978 So.2d at 21-22.
This Court has recognized several categories of actions that are not barred by § 14:

*507 "There are four general categories of actions which ... we stated do not come within the prohibition of § 14:(1) actions brought to compel State officials to perform their legal duties; (2) 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 Judgments Act, Tit. 7, § 156, et seq., seeking construction of a statute and its application in a given situation. ... Other actions which are not prohibited by § 14 are: (5) valid inverse condemnation actions brought against State officials in their representative capacity; and (6) actions for injunction or damages brought against State officials in their representative capacity and individually where it was alleged that they had acted fraudulently, in bad faith, beyond their authority or in a mistaken interpretation of law."
Drummond Co. v. Alabama Dep't of Transp., 937 So.2d 56, 58 (Ala.2006).
In other words, an inverse-condemnation action must be brought against a State official in his or her official capacity. Ex parte Carter, supra. See also Alabama Dep't of Corr. v. Montgomery County Comm'n, 11 So.3d 189, 194 (Ala.2008) (the category of actions that are not barred by § 14 are "relevant only as they relate to claims against State officials in their official capacities, not as they relate to the State agency or the State itself").
In Alabama Department of Transportation v. Harbert International, Inc., 990 So.2d 831, 840 (Ala.2008), this Court clarified that those categories of actions that are not barred by § 14, e.g., inverse-condemnation actions, are sometimes referred to as "exceptions" to § 14:
"These actions are sometimes referred to as `exceptions' to § 14; however, in actuality these actions are simply not considered to be actions `"against the State" for § 14 purposes.' Patterson v. Gladwin Corp., 835 So.2d 137, 142 (Ala. 2002). This Court has qualified those `exceptions,' noting that `"[a]n action is one against the [S]tate when a favorable result for the plaintiff would directly affect a contract or property right of the State, or would result in the plaintiff's recovery of money from the [S]tate."' Alabama Agric. & Mech. Univ. v. Jones, 895 So.2d 867, 873 (Ala.2004)(quoting Shoals Cmty. Coll. v. Colagross, 674 So.2d 1311, 1314 (Ala.Civ.App.1995))(emphasis in Jones)."

IV. Conclusion
We agree with the State that because Cornelius's counterclaim alleging inverse condemnation named solely the State as a defendant, the Colbert Circuit Court lacked subject-matter jurisdiction to entertain the counterclaim and had no alternative but to dismiss it. "[A] complaint filed solely against the State or one of its agencies is a nullity and is void ab initio.... Any action taken by a court without subject-matter jurisdictionother than dismissing the action  is void." Montgomery County Commission, 11 So.3d at at 192.
Based on the foregoing, we hold that the Colbert Circuit Court does not have jurisdiction over the asserted counterclaim and that it must be dismissed.
PETITION GRANTED; WRIT ISSUED.
COBB, C.J., and LYONS, WOODALL, STUART, SMITH, PARKER, and SHAW, JJ., concur.
MURDOCK, J., concurs in the result.
NOTES
[1]  Colbert County's Revenue Commissioner, Billy W. Thompson, was named as a defendant.
