concurring in part and dissenting in part.
I agree with the majority’s opinion insofar as it affirms Jeffrey Scott Moore’s conviction. However, as discussed below, because the trial court did not have jurisdiction to order Moore to satisfy a civil judgment as part of his sentence in an unrelated criminal case or as a condition of his probation in the criminal case, I respectfully dissent from the opinion insofar as it affirms the sentence imposed in this case.
*154On appeal, Moore contends that the trial court did not have jurisdiction to order him to pay the child-support arrearage that had accrued since the entry of the divorce judgment, which also established child custody and support matters. In sentencing Moore on January 18, 2007, the trial court ordered that “all child support owing to [Kelly] shall be brought current by July 19, 2007” — six months after the date of sentencing.
From the record, it appears that the trial court’s decision to order Moore to pay the child-support arrearage came about because of a request made by Moore’s own trial counsel. At Moore’s sentencing hearing, Maxwell Pulliam, who was Moore’s attorney both at trial and on appeal, represented to the trial court that the forewoman of the jury told him that the jury wanted to recommend that Moore not receive prison time and suggested that instead, Moore be sentenced to receive counseling, that he be required to pay Kelly’s medical expenses, and that he be ordered to catch up on his child-support obligation, among other things. (Sentencing hearing, R. 11.) Pulliam then encouraged the trial court to consider the jury’s request, even though it was not bound to do so. Later in the same hearing, Pulliam again asked the trial court to place Moore on probation and to make one of the conditions of his probation the payment of his child-support obligation. (Sentencing hearing, R. 13.)
Ordinarily, the doctrine of invited error would preclude Moore from alleging error as to this issue. Under the doctrine of invited error, a defendant cannot voluntarily invite error by his own conduct and then seek to profit from that alleged error. Mack v. State, 736 So.2d 664, 671 (Ala. Crim.App.1999) (and cases cited therein). “A party cannot assume inconsistent positions in trial and in the appellate court and, as a general rule, will not be permitted to allege error in trial court proceedings that was invited by him or that was a natural consequence of his own actions.” Brooks v. State, 973 So.2d 380, 394 (Ala.Crim.App.2007); Smith v. State, 745 So.2d 922 (Ala.Crim.App.1999).
Nonetheless, one cannot consent to lack of subject-matter jurisdiction or invite a jurisdictional error. Bradley v. State, 925 So.2d 232, 241 (Ala.2005); Flannigan v. Jordan, 871 So.2d 767, 768 (Ala.2003). “A sentence that exceeds the maximum allowed by law is an illegal sentence affecting the trial court’s jurisdiction.” Wallace v. State, 959 So.2d 1161, 1165 (Ala.Crim. App.2006). Therefore, if Moore’s sentence exceeded the statutory punishment for the offenses for which he was convicted, the doctrine of invited error cannot properly be invoked to affirm that sentence.
In this case, Moore was before the court on charges of domestic violence in the third degree, a Class A misdemeanor, § 13A-6-132(a), Ala.Code 1975, and harassment and harassing communications, both of which are Class C misdemeanors, § 13A-ll-8(a)(3) and § 13A-11-8(b)(2), respectively. A Class A misdemeanor is punishable by not more than one year in jail, § 13A-5-7(a)(l), and a fine of not more than $2,000. § 13A-5-12(a)(1). A Class C misdemeanor is punishable by not more than three months in jail, § 13A-5-7(a)(3), and a fine of not more than $500. § 13A-5-7(a)(3).3
*155A criminal proceeding is brought before the court either by an indictment or a complaint. Rule 2.1, Ala. R.Crim. P. The matter of Moore’s alleged child-support ar-rearage was not a charge in the indictment against Moore, and it was not a basis for Moore’s convictions for domestic violence in the third degree, harassment, and harassing communications. Thus, in requiring Moore to pay his past-due child-support obligation by a date certain as part of his sentence, the trial court exceeded the scope of the statutory punishments allowed for the offenses committed.
The majority states that a court can order a probationer to support his dependents to the best of his ability, as authorized by § 15-22-52(9), Ala.Code 1975. The majority opinion also cites Bowers v. State, 565 So.2d 1203 (Ala.Crim.App.1990), for the proposition that the Legislature intended to grant trial courts a great deal of discretionary authority to establish the terms of an individual’s probation. I recognize those statements of the law and agree that requiring a probationer to support his dependents as a condition of probation is laudable.
However, in this case, the trial court went beyond merely ordering Moore to support his dependents to the best of his ability. Here, the trial court ordered Moore to pay his child-support arrearage in full by a certain date as a condition of his probation in an unrelated criminal case. The Supreme Court has held that the term “child-support obligation” as that term is contemplated by Rule 32(B)(6), Ala. R. Jud. Admin, (and thus, at issue here), does not encompass a “child-support arrear-age.” Ex parte State ex rel. Daw, 786 So.2d 1134, 1137 (Ala.2000); see also Sheeley v. Chapman, 953 So.2d 1252 (Ala.Civ.App.2006).
“A child-support obligation is based on the court’s expectation that the obligor will pay in accordance with the court’s established schedule. A delinquent child-support obligation, however, receives different treatment. It is clear that ‘child support payments become final judgments on the day they are due.’ Ex parte State ex rel. Lamon, 702 So.2d 449, 450 (Ala.1997); see also State v. Handley, 628 So.2d 726, 727 (Ala.Civ.App.1993); Grogan v. Grogan, 608 So.2d 397, 398 (Ala.Civ.App.1992); Hardy v. Hardy, 600 So.2d 1013, 1015 (Ala.Civ.App.1992); Foster v. Foster, 571 So.2d 1219, 1220 (Ala.Civ.App.1990); and O’Neal v. O’Neal, 532 So.2d 649, 650 (Ala.Civ.App.1988). Thus, the character of the obligation changes once it becomes delinquent, because the fact of the delinquency causes the party to whom the debt is owed to become a judgment creditor, a creditor who may then pursue the typical means of collection that are available to the holder of any judgment. Ex parte State ex rel. Lamon, 702 So.2d at 450. Therefore, a delinquent payment constitutes a legal liability of the obligor, while a child-support obligation is only an expectation that the obligor will make a payment in the future.”
Daw, 786 So.2d at 1137.
The law is settled that imprisonment for contempt should not be imposed where the failure to pay child-support arrearage is due to an inability to comply with the order. See, e.g., T.L.D. v. C.G., 849 So.2d 200 (Ala.Civ.App.2002); Falkner v. State ex rel. Falkner, 769 So.2d 933 (Ala.Civ.App.2000); Vinson v. State ex rel. Barron, 724 So.2d 550 (Ala.Civ.App.1998); and Muery v. Muery, 46 Ala.App. 617, 247 So.2d 123, cert. denied, 287 Ala. 737, 247 So.2d 128 (1971). As this Court recognized in Dixon v. State, 920 So.2d 1122, 1126 (Ala.Crim.App.2005):
*156“Nowhere in our caselaw, statutes, or rules do we allow the imprisonment of a civil debtor because he or she is unable to pay the debt. Nowhere in our case-law, statutes, or rules will a case of constructive contempt lie for the inability to pay a debt owed to a creditor or, in this case, a victim. Rather, a suit is commenced, a judgment is obtained and executed, and a lien is imposed or wages are garnished. That is, the victim takes advantage of his or her civil remedies; the court does not act as an enforcer and compel payment to the victim through the imposition of a criminal penalty upon the indigent debtor.”
If, under our system of laws, imprisonment cannot be countenanced for an inability to pay child support, then it stands to reason that it cannot be an appropriate condition of probation to require a criminal defendant to pay a civil judgment, such as a child-support arrearage, in an unrelated criminal matter, i.e., a matter which is not considered a parallel proceeding. My research has revealed no statute, caselaw, rule or other authority that would allow a trial court to impose as a condition of probation in a criminal matter the satisfaction of a civil judgment in an unrelated matter. Indeed, to allow such a requirement as a condition to probation seems anathema to American jurisprudence.
In this case, the payment of child-support arrearage cannot be considered a form of restitution for Moore’s conviction for domestic violence and harassment. Whether Moore was in arrears on his child-support obligation was not a matter before the trial court. There has been no finding of contempt against Moore for his alleged failure to pay child support. In ordering Moore to pay his child-support arrearage as a condition of his probation in this criminal matter, the trial court in Moore’s criminal case is becoming entangled in a civil matter that is not before it.4 The trial court’s sentence, requiring Moore to pay what is in fact a civil judgment in an unrelated case as a condition of his probation in this criminal case, constitutes an illegal sentence.
An illegal sentence exceeds the jurisdiction of the trial court and is void. Wallace, 959 So.2d at 1165; Rogers v. State, 728 So.2d 690, 691 (Ala.Crim.App.1998). Because the trial court did not have the jurisdiction to order Moore to pay his child-support arrearage as part of his sentence in this criminal case, that portion of the judgment ordering such payment is void.
In reaching this conclusion, I want it understood that I do not condone the apparent manipulation of Moore’s sentence by his attorney. In ordering Moore to pay his child-support arrearage as part of his sentence in this case, the trial court was acting on the recommendation of Moore’s attorney — the same attorney who is now challenging the very sentence he recommended. A defendant cannot invite jurisdictional error; however, he can, by his actions, waive his right to be free from double jeopardy. Bradley v. State, 925 So.2d 232, 241 (Ala.2005). The record in this case shows that Moore received the very sentence his attorney asked of the trial court but which he now claims was error. That Moore was only ordered to spend 90 days in jail for his convictions appears to have been brought about in consideration of the fact that the court expected Moore to pay his past-due child-support obligation.
*157For the reasons set forth above, I would reverse Moore’s sentence and remand this cause, directing the trial court to resen-tence Moore without consideration of his child-support arrearage. Therefore, I must respectfully dissent from the majority opinion insofar as it affirms Moore’s sentence.
. Misdemeanors may also be subject to fines of any amount not exceeding double the pecuniary gain to the defendant or loss to the victim caused by the commission of the offense. § 13 A — 5—12 (a)(4). A court may conduct a hearing on the amount of such loss to the victim, which, in this case, were the medical bills Kelly accrued as a result of Moore's assault upon her.
. Further, I note that Act No. 388, Alabama Acts 1976, § 1 (amending § 6-118 of the Unified Courts Act), codified at § 12-17-70, Ala. Code 1975, authorizes a domestic-relations division for all circuits of this state.