
515 N.W.2d 816 (1994)
245 Neb. 936
Tony BERUMEN, Appellant,
v.
Thomas CASADY, Sheriff of Lancaster County, Nebraska, Appellee.
No. S-92-209.
Supreme Court of Nebraska.
May 20, 1994.
*818 John S. Mingus, of Mingus & Mingus, Ravenna, for appellant.
Gary E. Lacey, Lancaster County Atty., and James P. Rocke, Lincoln, for appellee.
HASTINGS, C.J., and WHITE, CAPORALE, FAHRNBRUCH, and LANPHIER, JJ.
CAPORALE, Justice.
In this habeas corpus action, the district court denied the petitioner-appellant, Tony Berumen, a writ commanding the sheriff of Lancaster County, Nebraska, the respondent-appellee, Thomas Casady, to discharge Berumen from custody. Berumen then appealed to the Nebraska Court of Appeals, asserting that the district court erred in, among other things, failing to find that the judgment under which he was incarcerated was void. The Court of Appeals affirmed the judgment of the district court, whereupon Berumen successfully petitioned for further review by this court. See Berumen v. Casady, 93 NCA No. 49, case No. A-92-209, 1993 WL 500768 (not designated for permanent publication). We reverse the judgment of the Court of Appeals and remand the cause to that court with the direction that it reverse the judgment of the district court and direct that the writ be issued.
According to Neb.Rev.Stat. § 29-2823 (Reissue 1989), a habeas corpus action "may be reviewed as provided by law for appeal in civil cases," which language brings such an appeal within the procedural requirements of Neb.Rev.Stat. § 25-1912 et seq. (Reissue 1989 & Cum.Supp.1992) and its predecessors. Neudeck v. Buettow, 166 Neb. 649, 90 N.W.2d 254 (1958). See, State ex rel. Miller v. Cavett, 163 Neb. 584, 80 N.W.2d 692 (1957); In re Application of Tail, Tail v. Olson, 144 Neb. 820, 14 N.W.2d 840 (1944).
We have stated that where a judgment is attacked in a way other than a proceeding in the original action to have it vacated, reversed, or modified, or other than a proceeding in equity for its enforcement, the attack is a collateral one, and that only a void judgment is subject to such an attack. Mayfield v. Hartmann, 221 Neb. 122, 375 N.W.2d 146 (1985).
As is documented later in this opinion, an action for habeas corpus constitutes a collateral attack on a judgment. Thus, inasmuch as only a void judgment is subject to attack in a habeas corpus action, we are limited in such a case to reviewing a question of law, namely, is the judgment in question void? Regarding a question of law, an appellate court has an obligation to reach a conclusion independent of that reached by the court below. Mackiewicz v. J.J. & Associates, 245 Neb. 568, 514 N.W.2d 613 (1994).
Berumen was arrested on September 17, 1981, and charged with third-offense driving while intoxicated, in violation of Neb.Rev. Stat. § 39-669.07 (Cum.Supp.1980). He ultimately pled guilty to second-offense driving while intoxicated.
The penalties imposed by § 39-669.07 depended upon the number of a defendant's prior driving while intoxicated convictions. One convicted of a second offense was guilty of a Class III misdemeanor, § 39-669.07(2), which permitted incarceration for a period of up to 3 months, Neb.Rev.Stat. § 28-106 (Reissue 1979).
Following the district court's acceptance of Berumen's plea, the prosecutor stated: "The State would also show, Your Honor, that ... Berumen was convicted of driving under the influence of alcoholic liquor ... on September first, 1979." Although the State offered nothing further with regard to the prior conviction, the district court sentenced Berumen as a second offender and required that he be incarcerated for 3 months. For reasons which are not material to this appeal, Berumen did not begin to serve his sentence until shortly before he instituted this proceeding; although he has served the maximum period of incarceration permitted for a first-offense driving while intoxicated conviction, he has not yet served the entire 3-month period imposed.
Consistent with the rule that only a void judgment is subject to a collateral attack, a writ of habeas corpus is a proper remedy only upon a showing that the judgment, sentence, and commitment are void. *819 Anderson v. Gunter, 235 Neb. 560, 456 N.W.2d 286 (1990); Rust v. Gunter, 228 Neb. 141, 421 N.W.2d 458 (1988); Kerns v. Grammer, 227 Neb. 165, 416 N.W.2d 253 (1987); Anderson and Hochstein v. Gunter, 226 Neb. 724, 414 N.W.2d 281 (1987); Hrbek v. Shortridge, 223 Neb. 785, 394 N.W.2d 285 (1986); Mingus v. Fairbanks, 211 Neb. 81, 317 N.W.2d 770 (1982). In Sileven v. Tesch, 212 Neb. 880, 884, 326 N.W.2d 850, 853 (1982), we wrote:
It has long been the rule in this jurisdiction that habeas corpus is a collateral proceeding and as such cannot be used as a substitute for an appeal or proceedings in error. [Citations omitted.]
Furthermore, in Piercy v. Parratt, 202 Neb. 102, 105-06, 273 N.W.2d 689, 691 (1979), we said: "We have consistently held that to release a person from a sentence of imprisonment by habeas corpus it must appear that the sentence was absolutely void. Habeas corpus will not lie to discharge a person from a sentence of penal servitude where the court imposing the sentence had jurisdiction of the offense and the person of the defendant, and the sentence was within the power of the court to impose, unless the sentence has been fully served and the prisoner is being illegally held. [Citations omitted.]"
Consistent with the fact that in a criminal case the judgment is the sentence, State v. Long, 205 Neb. 252, 286 N.W.2d 772 (1980), Berumen claims the judgment arising out of the 1981 arrest is void because the State failed to establish that the 1979 conviction used to enhance his sentence as a two-time offender was counseled or, in the alternative, that he had waived counsel.
One of the circumstances which renders a sentence void is that the court lacked a legal basis to impose it. For example, in Mingus v. Fairbanks, supra, we held that the trial court could not find the defendant guilty of the uncharged offense of debauching a minor, notwithstanding defendant's plea of not guilty to pandering, as the former offense was not a lesser offense included with the pandering charge. In so ruling, we quoted with approval from In re McVey, 50 Neb. 481, 70 N.W. 51 (1897), which was cited with approval in State v. McClarity, 180 Neb. 246, 142 N.W.2d 152 (1966), as follows:
In McVey, the appellant was charged with the crime of burglary. The jury acquitted the appellant on the charge of burglary, but found him guilty of breaking and entering in the daytime. In discharging appellant from custody, we said at 483-84, 70 N.W. at 52: "The only further question presented is whether the sentence of the court was merely erroneous or whether it was illegal in such a sense as to be void. It may be said that the modern doctrine or idea is that a court must possess jurisdiction not only of the person and subject-matter, but to impose the sentence which is adjudged. If the latter is lacking the sentence is not merely voidable but void. (Black, Judgments, sec. 258; citing, among others, Ex parte Lange, 18 Wall. [U.S.], [1]63[, 21 L.Ed. 872 (1874)]; Ex parte Milligan, 4 Wall. [U.S.], 131[, 18 L.Ed. 281 (1866) ]; Ex parte Wilson, 114 U.S., 417[, 5 S.Ct. 935, 29 L.Ed. 89 (1885) ]; Ex parte Kearny, 55 Cal., 212; In re Petty, 22 Kan., 477. See, also, Ex parte Cox, 32 Pac.Rep. [Ida.], 197 [(1893)]; Ex parte Yarbrough, 110 U.S., 651[, 4 S.Ct. 152, 28 L.Ed. 274 (1884) ].) In the case at bar, the jury having, by its verdict, determined the prisoner not guilty as charged, although it further adjudged him guilty of another crime, the trial court had no jurisdiction to sentence him; hence its attempt in that direction was illegal in such sense that it was void, and habeas corpus the appropriate remedy. (In re Betts, 36 Neb., 282[, 54 N.W. 524 (1893)]; In re Hav[e]lik, 45 Neb., 747[, 64 N.W. 234 (1895) ].) It follows that the prisoner must be discharged."
Mingus v. Fairbanks, 211 Neb. at 84-85, 317 N.W.2d at 772. The McVey analysis makes clear that in the context used in that opinion, the reference to jurisdiction referred not to the court's authority to entertain the proceeding, but to the existence of a legal basis upon which to impose the sentence exacted.
By now there can be no question that the law authorizes a court to use a prior driving while intoxicated conviction to enhance the sentence in the subsequent driving *820 while intoxicated offense then before the court only if the State has proved either that the enhancing conviction was counseled or that the defendant waived counsel. State v. Ristau, 245 Neb. 52, 511 N.W.2d 83 (1994). And it is also well settled that it cannot be assumed from a silent record that a defendant either had or waived counsel. See, Baldasar v. Illinois, 446 U.S. 222, 100 S.Ct. 1585, 64 L.Ed.2d 169 (1980); State v. Smyth, 217 Neb. 153, 347 N.W.2d 859 (1984). Moreover, a collateral attack may be made on an enhanced driving while intoxicated sentence imposed in the absence of proof that the defendant had or waived counsel in the enhancing conviction, for such an enhanced sentence is constitutionally invalid and thus void. State v. Wiltshire, 241 Neb. 817, 491 N.W.2d 324 (1992).
Thus, for one who is in custody, habeas corpus is a proper means of collaterally challenging the validity of an enhanced driving while intoxicated sentence.
While it is true that the petitioner in a habeas corpus proceeding has the burden of proving that the sentence is void, Dovel v. Adams, 207 Neb. 766, 301 N.W.2d 102 (1981), Berumen met that burden by putting into evidence the bill of exceptions of the enhancement proceedings, which demonstrates that the sentence was void because the State failed to establish that he had or waived counsel at the time of the 1979 conviction.
We thus, as stated in the first paragraph of this opinion, reverse the judgment of the Court of Appeals and remand the cause to that court with the direction that it reverse the judgment of the district court and direct that the writ be issued.
REVERSED AND REMANDED WITH DIRECTION.
BOSLAUGH, J., participating on briefs.
WRIGHT, J., not participating.
