902 F.2d 616
Kirk J. McCARTNEY, Appellant,v.Joseph VITEK, Director, Douglas County Correctional Center;Robert Spire, Attorney General of the State ofNebraska.  Appellees.
No. 89-2047.
United States Court of Appeals,Eighth Circuit.
Submitted Dec. 12, 1989.Decided Feb. 7, 1990.

Brent Bloom, Omaha, Neb., for appellant.
Susan M. Ugai, Lincoln, Neb., for appellees.
Before McMILLIAN, JOHN R. GIBSON and MAGILL, Circuit Judges.
PER CURIAM.


1
Kirk J. McCartney appeals from the district court's1 order denying his 28 U.S.C. Sec. 2254 petition for habeas corpus, prior to service of process.  We affirm.


2
On February 29, 1988, McCartney pleaded guilty in Nebraska county court to driving a motor vehicle under the influence of alcoholic liquor or drugs (DUI);  it was his third such conviction.  At a subsequent hearing, McCartney contested the validity of the first DUI conviction that the state sought to use for enhancement purposes.  A transcript of the guilty plea for this prior conviction was admitted into evidence, and the prior conviction was found to be sufficient for enhancement purposes.  He was sentenced as a third-time offender to seven days in jail, a fine and probation;  his license was suspended for one year.


3
The state district court upheld the county court on appeal on the ground that McCartney had been represented by counsel at the time he entered the guilty plea to the first DUI charge.  McCartney appealed to the state supreme court which summarily affirmed.  McCartney then filed this section 2254 petition, claiming that the first conviction used for enhancement was insufficient as a matter of law because the plea transcript failed to show that he was advised of his constitutional rights.  The district court determined that McCartney had failed to exhaust his state remedies.  The petition was therefore dismissed prior to service, and this timely appeal followed.


4
Exhaustion of state remedies is a prerequisite to the filing of an application for a writ of habeas corpus.  28 U.S.C. Sec. 2254(b).  A petitioner must have presented to the state court, both the factual and legal basis of the claim he asserts in federal court.  Smittie v. Lockhart, 843 F.2d 295, 297 (8th Cir.1988).  Failure to exhaust state remedies may be raised sua sponte by a federal court.  Davis v. Campbell, 608 F.2d 317, 320 (8th Cir.1979) (per curiam).


5
Here McCartney's petition fails to state the grounds which were the basis of his state court appeal.  Furthermore, in his brief, McCartney states only that he appealed to the state district court "to determine whether there was an error in determining the validity of the First Offense conviction."


6
Although a pro se habeas petition is to be interpreted liberally by a reviewing federal court, habeas pleadings prepared by counsel, as in this case, need not be treated so leniently.  Williams v. Lockhart, 849 F.2d 1134, 1138 (8th Cir.1988).  McCartney's allegations present a proper ground for habeas corpus relief.  See Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969).  His vague and general pleadings, however, fail to reveal whether this particular attack on the constitutionality of his first DUI conviction was fairly presented to the state courts.


7
A habeas petition should not be dismissed for failure to exhaust state remedies before the state has responded.  Ali v. State, 777 F.2d 1489, 1489-90 (11th Cir.1985) (per curiam).  Here, however, it is clear from the state's brief on appeal that it would not waive the exhaustion issue.  See id. at 1490.


8
Accordingly, we interpret the district court's dismissal as being without prejudice and affirm.



1
 The Honorable William G. Cambridge, United States District Judge for the District of Nebraska


