Gregory James Eddins is currently incarcerated at the Donaldson Correctional Facility (“the prison”) in Jefferson County, serving a 30-year sentence that began in 2004. In this case, he appeals from a judgment of the Jefferson Circuit Court dismissing his action requesting that the State of Alabama (“the State”) provide him with adequate medical treatment for diabetes while he is incarcerated.
Eddins originally filed the action in the Madison Circuit Court in January 2014, using a form titled “Petition for Relief from Conviction or Sentence,” purportedly pursuant to Rule 32, Ala. R.Crim. P. In his verified petition, Eddins alleged that in September 2010, while he was incarcerated, laboratory tests indicated that he has diabetes. He also alleged that annual laboratory tests performed since 2010 support his claim that he is diabetic. Nonetheless, Eddins says, he is not being treated for diabetes, and, thus, he asserts, he runs the risk of going blind, losing a limb, going into a diabetic coma, or dying. Among the relief Eddins requested in his petition is an order directing the State — presumably the Alabama Department of Corrections (“the DOC”) — to provide him with necessary or appropriate medical care to treat his diabetes.
The Madison Circuit Court dismissed Eddins’s petition on the ground that it failed to state a claim for which relief could be granted and failed to raise any material issues. Eddins appealed, and this court reversed the judgment of the Madison Circuit Court, determining that, although Ed-dins sought relief in the form of a Rule 32 petition for relief from his conviction or sentence, the substance of Eddins’s petition was actually a cognizable civil action alleging that the State had acted with deliberate indifference to his medical needs. Eddins v. State, 160 So.3d 18, 19 (Ala.Civ.App.2014). In Eddins, we cited a number of authorities standing for the proposition that the substance of a plaintiffs complaint, not the style the plaintiff attaches to the complaint, controls in determining the claims alleged. See, e.g., Assurant, Inc. v. Mitchell, 26 So.3d 1171, 1175 (Ala.2009); Elizabeth Homes, L.L.C. v. Cato, 968 So.2d 1, 8 (Ala.2007); and Bailey v. Faulkner, 940 So.2d 247, 253 (Ala.2006).
After discussing the cited authority, we held that,
“[ajlthough Eddins’s petition was written on a form intended for inmates to use in seeking Rule 32 relief from their convictions or sentences, the substance of the petition clearly alleges that the State improperly and intentionally denied him medical treatment. The trial court recognized the nature of Eddins’s claim in its judgment of dismissal, in which it stated that, ‘[i]n his present Rule 32 petition Eddins complains that the medical treatment given him by the State is either inadequate or improper.’ Based on the authority of Assurant and Underwood, the trial court should have treated Eddins’s petition according to its substance rather than its caption; that is to say, it should have treated Eddins’s petition as a complaint alleging deliberate indifference to Eddins’s medical care. Assurant, supra (and cases cited therein).”
Eddins, 160 So.3d at 20.
Additionally, we wrote:
“[T]o the extent that Eddins’s petition sought an order directing the State to provide him with adequate medical test*1059ing and treatment for his alleged diabetic condition, there is no question that Eddins would be entitled to the relief he sought if he is able to make the proper' showing of proof. In other words, Ed-dins has stated a claim for which relief can be granted. Accordingly, the trial court erred in dismissing the action.”
Id. at 21.
On remand, the Madison Circuit Court, on its own motion, transferred the action to the Jefferson Circuit Court, “there to proceed as if originally commenced therein.” Despite this court’s holding in Ed-dins, the Jefferson Circuit Court again dismissed the petition because, it said, it did not have jurisdiction to grant a “Petition for Relief from Conviction or Sentence.” In the judgment, the Jefferson Circuit Court stated that Eddins had “the right to file a Habeas Corpus petition” requesting relief. Eddins again appealed from the dismissal of his petition.
On appeal, the State has submitted a brief agreeing with Eddins that the Jefferson Circuit Court erred in dismissing the petition. The State writes that this court “correctly held that Eddins’ pleading, although filed on a Rule 32 form, was in substance a complaint for medical treatment, or more correctly, the alleged lack of medical treatment.” In its brief, the State declares that the Jefferson Circuit Court “should have treated Eddins’ pleading as a conditions of confinement complaint.” Moreover, the State says, the Alabama Court of Criminal Appeals has repeatedly held that a habeas corpus petition cannot be used to challenge the conditions of confinement. See Looney v. State, 881 So.2d 1061, 1063 (Ala.Crim.App.2002).
The Jefferson Circuit Court erred in dismissing Eddins’s action. Accordingly, the judgment is reversed and the cause is remanded for farther proceedings consistent with this opinion and our previous decision in Eddins.
REVERSED AND REMANDED.
All the judges concur.