— The return to the writ of habeas corpus shows, as the cause of the relator’s detention and imprisonment, a judgment of the mayor’s court of the city of Montgomery, convicting him of violating an ordinance of the city council, punishing the knowingly bringing stolen property into the city, sentencing him to pay a fine of one hundred dollars, and, in default of payment, to one hundred days of hard labor for the city. A writ of habeas corpus, issued by any court or judge, in the exercise of original jurisdiction, was not at common law, and is not under our statutes, a revisory remedy — it is not, and cannot be employed, to answer the purposes of a writ of error, or of certiorari, or appeal. The only inquiry which can be made into the judgment and sentence of conviction of another court, returned as the cause of detention, and in justification of it, is into the legality of the judgment — the jurisdiction of the court render*474ing it. There can be no inquiry into its regularity : error in the proceedings it is not the function of the writ to correct. Hurd on Habeas Corpus, Book 2, chap. 6, 324, et seq., 2d ed. ; The principle is embodied in the statute. — Code of 1876, §§ 4961-2; Ex parte Burnett, 30 Ala. 461; Ex parte Simmons, 62 Ala. 446; Kirby v. State, Ib. 51.
The authority of the city council to enact the ordinance which the relator is charged with having violated, and its regular enactment, were admitted on the hearing before the judge of the City Court; and there is no room for doubt, in reference either to the power, or the regularity of its exercise. Original jurisdiction to try and convict, imposing the penalties to which the relator was subjected, is conferred on the mayor’s court by the charter. It can not be doubted that the judgment and sentence of conviction returned by the marshal, would afford him full justification, if the relator was suing him for false imprisonment; nor can it be read in connection with the charter of the city, and the ordinances, and doubt entertained that, in its rendition, the mayor’s court was exercising jurisdiction with which it was clothed. Behind and beyond it we must look, even for error or irregularity : it is not discoverable on the face of the judgment and sentence. Error, or irregularity, may exist; but, if it exists, it cannot be inquired into collaterally : it can not render void and annul the sentence and judgment a court of competent jurisdiction has pronounced. Finality, eonclusiveness, verity, is the attribute of every judgment of a court of competent jurisdiction, collaterally assailed. The court rendering it, in relation to other courts, may be a court of inferior, as distinguished from a court of superior jurisdiction ; it is jurisdiction, the power and duty to hear and determine, and not the relation to other courts, which, upon every consideration of public .policy, imparts inviolability, when drawn in question collaterally.— Ex parte Watkins, 3 Pet. 193.
Whatever in the course of the proceedings resulting in the conviction of the relator, now imputed as vitiating them, was of regularity, not of legality ; determinable in the first instance by the mayor’s court; and when determined, the determination is conclusive, until a superior tribunal, in a direct proceeding, pronounces the determination erroneous. If a superior tribunal, on a return to a habeas corpus, issuing in the exercise of its original jurisdiction, should inquire into the correctness of the determination, it would do the wrong now imputed to the mayor’s court — it would exceed its jurisdiction.
The judgment of the City Court was right and proper — the *475only judgment- it could render; and the application of the relator must he refused.