
6 So.3d 1126 (2008)
Ex parte ALABAMA DEPARTMENT OF TRANSPORTATION.
(In re Russell Petroleum, Inc. v. Alabama Department of Transportation).
1070721.
Supreme Court of Alabama.
June 13, 2008.
Order Overruling Rehearing October 24, 2008.
Jim R. Ippolito, Jr., asst. atty. gen. and chief counsel, Alabama Department of Transportation; and Jack B. Hinton, Jr., deputy atty gen., of Gidiere, Hinton, Herndon & Christman, Montgomery for petitioner.
J. Doyle Fuller and Susan G. Copeland of Law Office of J. Doyle Fuller, P.C., Montgomery, for respondent.
WOODALL, Justice.
The Alabama Department of Transportation ("ADOT") petitions this Court for a writ of mandamus directing the Montgomery Circuit Court (1) to vacate its order denying ADOT's motion to dismiss this action, and (2) to dismiss the action with prejudice for lack of subject-matter jurisdiction. We grant the petition.
This action began on September 30, 2005, when Russell Petroleum, Inc. ("Russell"), sued ADOT seeking compensation for ADOT's alleged "inverse condemnation" of Russell's property. On November 18, 2005, ADOT moved to dismiss on the ground that the action is barred by the sovereign-immunity section of the Alabama Constitution, namely, Ala. Const.1901, § 14 ("the State shall never be made a defendant in any court of law or equity"). Subsequently, Russell filed a motion seeking to "substitute (or add) D.J. McInnes, as Director of [ADOT] as the Defendant in this case [(`the director')], to dismiss *1127 [ADOT] as a Defendant, and to permit this litigation to proceed accordingly." It also filed an amended complaint styled "Russell Petroleum, Inc. v. Alabama Department of Transportation; and D.J. McInnes, as Director of the Alabama Department of Transportation." The claims in the amended complaint were in three counts. Count one sought a judgment declaring that the director had taken Russell's property without just compensation. Count two sought a writ of mandamus compelling the director to compensate Russell for the alleged taking. Count three sought "an award of money that [would] justly compensate [Russell] for the inverse condemnation and taking of its property."
On November 30, 2007, ADOT and the director filed a joint motion to dismiss the case, arguing that, based on the authority of Ex parte Alabama Department of Transportation, 978 So.2d 17 (Ala.2007) ("Good Hope"), the court did not have subject-matter jurisdiction over them. In their brief in support of that motion, ADOT and the director argued that the amended complaint was a nullity and that the court had no alternative but to dismiss the action. This was so, because, they argued, the original complaint failed to invoke the subject-matter jurisdiction of the trial court, having named only ADOT, which is absolutely immune from suit, and the amended complaint, which purported to amend an action that was void ab initio, was a nullity; therefore, no jurisdiction attached as a result of the purported amendment. The trial court denied the motion to dismiss, and this petition followed.
In this Court, ADOT reasserts its reliance on Good Hope and its progeny for the proposition that Russell's initial complaint against ADOT did not "confer jurisdiction on the circuit court" and, therefore, could not "serve as the basis for any amendment." ADOT's petition, at 26. Its reliance is well-placed.
In Good Hope, Good Hope Contracting Company, Inc. ("the Company"), sued ADOT seeking declaratory relief, damages for breach of contract, and a writ of mandamus directing ADOT to pay for services the Company had allegedly rendered to ADOT. Good Hope, 978 So.2d at 20. ADOT "moved the trial court to dismiss the complaint on the ground that [ADOT], as an agency of the State of Alabama, is entitled to sovereign immunity under § 14, Ala. Const.1901." Good Hope, 978 So.2d at 20. When the trial court failed to rule on the motion, ADOT petitioned this Court for a writ of mandamus. Id. In its response to the petition, the Company asked this Court to direct the trial judge "to allow [the Company] to amend its complaint to add the proper party." 978 So.2d at 25 (emphasis added).
This Court first addressed the consequences of suing ADOT, a state agency. In that connection, we said:
"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 *1128 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.
We also refused to allow the Company to amend its complaint to add the proper party. In that connection, we said:
"[ADOT] argued in its motion to dismiss that, as a State agency, it was not the proper party to be sued, and it pointed out that Good Hope had failed to name any State official as a party. [ADOT]'s supplemental submission and brief in support of motion to dismiss, tab 3 at 8.
"Further, in Ex parte Blankenship, 893 So.2d 303, 306-07 (Ala.2004), this Court held that, if a trial court lacks subject-matter jurisdiction, it has no power to take any action other than to dismiss the complaint. A trial court lacks subject-matter jurisdiction if the defendant is immune under the doctrine of sovereign immunity. Larkins, 806 So.2d at 364 (`"Article I, § 14, of the Alabama Constitution of 1901 thus removes subject-matter jurisdiction from the courts when an action is determined to be one against the State."' (quoting [Alabama State Docks Terminal Ry. v.] Lyles, 797 So.2d [432] at 435 [(Ala. 2001)])). Thus, this Court cannot order the trial court to allow Good Hope to amend its complaint because the trial court lacks subject-matter jurisdiction."
Good Hope, 978 So.2d at 26 (emphasis added). Accord Ex parte Alabama Dep't of Transp., 990 So.2d 366 (Ala.2008).
On the authority of these cases, we hold that the trial court lacked subject-matter jurisdiction to entertain an amendment to the original complaint, which was filed solely against ADOT. Because the trial court does not have  and has never had  subject-matter jurisdiction over this action, it must be dismissed.
PETITION GRANTED; WRIT ISSUED.
COBB, C.J., and SEE, SMITH, and PARKER, JJ., concur.

On Application for Rehearing
WOODALL, Justice.
APPLICATION OVERRULED; NO OPINION.
SEE, LYONS, STUART, SMITH, BOLIN, and PARKER, JJ., concur.
COBB, C.J., and MURDOCK, J., dissent.
MURDOCK, Justice (dissenting).
I respectfully dissent.[1]
The opinion on original submission relies in part upon the decision of this Court in Ex parte Alabama Department of Transportation, 978 So.2d 17 (Ala.2007) ("Good Hope"). I concurred in this Court's opinion in Good Hope. Were I voting in that case today, however, I would dissent as to Part III of the Court's opinion, "Proper Parties." Specifically, I would vote to remand the case for the trial court to consider whether to allow the plaintiff to amend *1129 the complaint to add a proper defendant. There was no statute of limitations or other temporal bar to bringing a claim against a properly named party in Good Hope. Based on the position I outlined recently in my dissenting opinion in Cadle Co. v. Shabani, 4 So.3d 460, 464 (Ala.2008), I see no reason why the trial court in Good Hope should not have been given the opportunity to consider whether to allow an amendment to the complaint in that case.
Aside from the payment of any necessary filing fee, whether a trial court has subject-matter jurisdiction over an action depends on whether the complaint states a claim, of a type and against a defendant, over which the trial court has subject-matter jurisdiction. In the present case, as in Good Hope, the attempt to amend the complaint to cause it to do exactly that comes before the applicable statute of limitations has run. For the reasons articulated in my special writing in Cadle, 4 So.3d at 464, I see no persuasive reason for not allowing the plaintiff to amend the complaint already on file with the trial court, thereby making that complaint one over which the trial court has subject-matter jurisdiction, rather than requiring the plaintiff to initiate an entirely new action.
NOTES
[1]  This case was decided on original submission by a division on which I do not sit. The application for rehearing, however, was considered by the entire Court.
