
    Daniel CLARK, Petitioner-Appellant, v. Claude WILLIAMS, Individually and in his official capacity as a district judge, et al., Respondents-Appellees.
    No. 82-1637.
    United States Court of Appeals, Fifth Circuit.
    Nov. 24, 1982.
    Daniel Clark, pro se.
    Mark White, Atty. Gen. of Tex., Austin, Tex., for respondents-appellees.
    Before CLARK, Chief Judge, POLITZ and HIGGINBOTHAM, Circuit Judges.
   PER CURIAM:

Daniel Clark applies to this Court for leave to appeal in forma pauperis. Pursuant to the provisions of 28 U.S.C. § 2106, we grant the motion to appeal in forma pauperis, summarily vacate the district court’s judgment of dismissal, and remand for further proceedings.

Appellant Clark’s pro se civil rights complaint seeks damages and declaratory and injunctive relief against 1) the state judge who presided over the criminal trial at which appellant was convicted of attempted murder, for which conviction he is currently serving a life sentence; 2) the two assistant district attorneys who prosecuted him; 3) the district attorney; 4) the narcotics agents who testified at his trial; 5) the court reporter; and 6) the state clerk of court. The complaint alleges a conspiracy among the defendants to “manufacture [appellant] as a felony criminal.” This was done, it is alleged, by the narcotics agents’ giving perjured testimony, known to be perjured by the prosecutors, the district attorney, and the judge. Further allegations state that the trial transcript was altered, probably by the clerk of court, the reporter, or persons known to them.

The federal district court sua sponte dismissed the suit as to the judge, prosecutors, district attorney, and the narcotics agents for failure to state a claim, based on those defendants’ immunity. As to the court reporter and clerk of court, the district court held that Clark had not exhausted his state habeas corpus remedies, and ordered the action dismissed without prejudice.

Without deciding whether a district court may, sua sponte, raise the affirmative defense of immunity and dismiss for failure to state a claim, see Boyd v. Carroll, 624 F.2d 730, 732-33 (5th Cir.1980) and Boone v. Kurtz, 617 F.2d 435, 436 (5th Cir.1980), we note that appellant is still in custody and that the allegations of his complaint draw into question the validity or the length of his confinement. That is, if the facts alleged in his complaint are proved, they would factually undermine or conflict with the state court conviction which resulted in his present confinement. In this circumstance, Clark’s sole federal remedy is habe-as corpus, not a civil rights suit. Preiser v. Rodriguez, 411 U.S. 475, 93 S.Ct. 1827, 36 L.Ed.2d 439 (1973); Ellison v. De La Rosa, 685 F.2d 959, 960 (5th Cir.1982). Therefore, appellant should exhaust his habeas corpus remedies before seeking relief through' a suit under 42 U.S.C. § 1983. Ellison at 960; Fulford v. Klein, 529 F.2d 377, 380 (5th Cir.1976) adhered to en banc, 550 F.2d 342 (1977); Caldwell v. Line, 679 F.2d 494, 496 (5th Cir.1982).

The judgment of the district court is vacated and the case is remanded for that court to consider whether to dismiss the action as to all defendants without prejudice or whether to hold the action in abeyance pending éxhaustion of habeas remedies. See Richardson v. Fleming, 651 F.2d 366, 373 (5th Cir.1981); Fulford v. Klein, 529 F.2d at 382; Meadows v. Evans, 529 F.2d 385, 386 (5th Cir.1976), adhered to en banc, 550 F.2d 345 (1977).

VACATED AND REMANDED.  