After this court had corrected a former judgment of affirmance (see Minto v. State, 8 Ala. App. 306, 62 South. 376), and reversed it as to that *401part dealing with the sentence to be imposed on the defendant, and remanded the canse to the end that the trial court sentence the defendant as required by law (see Minto v. State, 9 Ala. App. 95, 64 South. 369), the respondent, as the presiding judge of the trial court, refused, on the objection of the defendant, to impose the sentence as directed by the judgment of this court and as required by law, and the state brings this proceeding to enforce the action of the trial court to that end.
It is not questioned that mandamus is available as the proper remedy to compel the action of the trial court in sentencing the prisoner, Minto, if the duty to act exists — -that is, if the trial judge by virtue of his office is in duty bound to impose the sentence.
The respondent in his answer admits the facts set up in the petition filed on behalf of the state by the Attorney General and the solicitor of the trial court, and seeks to justify his action by setting up certain matters hereinafter to be discussed. The following matters in justification are set up in the answer, and are not controverted by the petitioner, but, on the contrary, are admitted :
First. That between the time when this court affirmed the judgment of the trial court in the case of Minto v. State (8 Ala. App. 306, 62 South. 376), imposing an unauthorized sentence to the penitentiary, and the time Avhen it modified that judgment and in part reversed the judgment of the lower court and remanded the cause for the imposition of sentence as required by law (Minto v. State, 9 Ala. App. 95, 64 South. 369), the respondent had discharged the prisoner from custody on a habeas corpus proceeding, on the ground that he was illegally held in confinement by the penitentiary authorities of the state under a void sentence imposed by respondent; it being further set up in the answer in this connection, *402and admitted, that the appeal of the state from the order of respondent discharging the prisoner on habeas corpus was never perfected, but was dismissed in this court because not taken in the time allowed by law for prosecuting such appeals.
Second, That it was shown to the respondent, acting by virtue of his office as presiding judge of the trial court, when the prisoner was brought before him to be resentenced in conformity with the law and as ordered by the judgment of this court, that, during that period of time after the judgment of affirmance had been rendered in the said case by this court, and prior to the rendition of the judgment correcting that former judgment and ordering a remandment for the purpose of the imposition of a proper sentence as required by law, the prisoner had served, part of the unauthorized sentence to imprisonment in the penitentiary.
The questions presented in this proceeding were considered and discussed in the hearing of the cases of Minto v. State, 9 Ala. App. 95, 64 South. 369, and Adams v. State, 9 Ala. App. 89, 64 South. 371. While we regarded these matters as within the issues presented by the records of those cases and passed upon them in that light, yet, after what has been said by the Supreme Court in Ex parte Adams, 65 South. 514, and Ex parte Minto, 65 South. 516, in exercising its supervisory authority, the discussion of these questions in those cases was not necessary to a decision,, and therefore must be considered in the nature of dicta, although treated and considered by us at the time as necessarily involved and embodied in the determination and pronouncement of judgment by the court on the questions before it. But again considering the questions presented by this proceeding in the light of all that has been said in these cases, we are impressed with the soundness of the views *403expressed by the then presiding judge of this court in rendering the opinion of the court on the original hearings and on the applications for rehearing in the cases of Minto v. State, supra, and Adams v. State, supra. Tt seems to us that what is there said is a complete answer to the contention of the respondent urged here with respect to the matters set up as excuse for refusing to impose a sentence on the prisoner as required by law and as ordered by the judgment of this court remanding the said case that such action be taken by respondent by virtue of his office as presiding judge of the trial court. The case of Ex parte Lange, 18 Wall. 163, 21 L. Ed. 872, principally relied on then and now by counsel for respondent, is discussed and differentiated in the opinion written by Presiding Judge Walker, when the same counsel appearing in this proceeding and this court were treating the question now presented as fairly before the court in those cases, and we do not deem it necessary to. say more on that score than that, after again carefully considering the proposition, we think the expressions and reasoning set forth in the opinions in the Minto and Adams Gases to be founded in right and law, and that it seems to us that to adopt an opposing view would not only be erroneous, but would set a precedent fraught with dangerous difficulties in the way of enforcing an orderly administration of the law.
The discharge of the prisoner on a petition in a habeas corpus proceeding was illegal and but a mere nullity, as the court was without jurisdiction in the premises, as it is shown that this action was taken by the trial judge, the respondent, at a time after the judgment of the trial court had been affirmed and merged in a judgment of this court, and while this court, as we know from its own records, of which we take cognizance, yet had'the judgment in its breast and had control over it. Clearly, *404under such circumstances, the respondent could not legally entertain the petition for habeas corpus and thereby deprive this court or the city court of the right to enforce its judgments. — Ex parte State ex rel. Attorney General, 150 Ala. 489, 43 South. 490, 10 L. R. A. (N. S.) 1129, 124 Am. St. Rep. 79.
“The writ of habeas corpus is not to be permitted to be used to obtain a discharge from an illegal restraint, so long as the party complaining may be protected against it by an appellate court which still retains the power to require a legal sentence to be substituted for the illegal one which is complained of.” — Minto v. State, supra.
The provisions of section 7035 of the Code have reference to a legal discharge on habeas corpus proceedings instituted by authority of law. The judgment discharging the prisoner on habeas corpus, being void, is open to collateral attack. Furthermore, the ecmse upon which the prisoner, Minto, predicated his petition for the writ of habeas corpus, and the cause relied on as justifying the granting of the writ by the judge of the city court, was the prisoner’s illegal restraint under a void sentence, a sentence not authorized by law; and, even if it should be conceded that the judge of the city court acquired jurisdiction to grant the writ and enter an order relieving the prisoner from restraint for that cause, yet there is nothing in section 7035 of the Code that stands in the way of the city court’s subsequently imposing a legal sentence, following a proper judgment of conviction for crime, and committing him to the custody of the proper authority in the enforcement of that sentence.
The sentence imposing imprisonment in the penitentiary is admitted by brief filed by counsel for respondent to be void. Certainly this sentence cannot, at the option of the prisoner, be treated as valid for the purpose of *405preventing the imposition of another sentence and, at the same time, as void for the purpose of securing a discharge from any restraint under it. — Minio’s Case, supra. Being void, the sentence was nothing which the law can recognize, the same as no sentence at all, and the prisoner cannot, by acquiescing in it, charged with the knowledge of its nullity, and commencing service under it, deprive the court of the right during that same term, while the judgment was still in the breast of the court, and the case within its control, to modify the judgment so as to provide for a punishment in conformity with the law. “It is not the duty of the citizen to submit to any other than a lawful arrest.” — Sanders v. State, 181 Ala. 35, 47, 61 South. 336, 340. Nor can a defendant, by submitting to an unlawful, void sentence seize upon the fact of his having done so as an excuse or reason for being relieved from a lawful sentence imposed in a manner conforming to law under an orderly procedure and administration of the law, and thus defeat the ends of justice by escaping the legal punishment for his crime, when he may have, perhaps, for this very purpose, voluntarily served but a day of the void sentence which was, at the same term of court so corrected as to require the imposition of a lawful sentence. — See opinion on application for rehearing in Adams v. State, 9 Ala. App. 89, 92, 64 South. 371. To hold the contrary would be to clothe the prisoner under legal judgment of conviction with authority to trifle with justice as to the imposition of a legal sentence following the judgment.
The petition is allowed, and the prayer of the petition is granted, and a writ of mandamus is ordered issued in accordance therewith, directed to respondent, in order that the judgment of the law may be pronounced by the respondent as presiding judge of the trial court in imposing sentence as required by law, in *406conformity with the former judgment and mandate of this court entered in the case of Minto v. State, supra.