29 F.3d 632
NOTICE: Ninth Circuit Rule 36-3 provides that dispositions other than opinions or orders designated for publication are not precedential and should not be cited except when relevant under the doctrines of law of the case, res judicata, or collateral estoppel.Rosendo JAUREGUI, Petitioner-Appellant,v.J. MARTINEZ, Warden;  Grant Woods, Attorney General,Respondents-Appellees.
No. 94-15598.
United States Court of Appeals, Ninth Circuit.
Submitted July 18, 1994.*Decided July 20, 1994.

Before:  FARRIS, KOZINSKI, and NOONAN, Circuit Judges.


1
MEMORANDUM**


2
Rosendo Jauregui, an Arizona state prisoner, appeals pro se the district court's dismissal of his 28 U.S.C. Sec. 2254 habeas petition for failure to exhaust state remedies.  We have jurisdiction under 28 U.S.C. Sec. 2253.  We review de novo,  Henry v. Estelle, 993 F.2d 1423, 1425 (9th Cir.1993), and affirm in part and vacate and remand in part.


3
When a prisoner challenges the fact or duration of his or her confinement, the exclusive federal remedy is a writ of habeas corpus.  Heck v. Humphrey, 62 U.S.L.W. 4594, 4595 (U.S. June 24, 1994);   Badea v. Cox, 931 F.2d 573, 574 (9th Cir.1991).  In contrast, when a prisoner challenges the conditions of his or her confinement, the proper mechanism is a civil rights action under 42 U.S.C. Sec. 1983.   Badea, 931 F.2d at 574.  A prisoner may also bring a Sec. 1983 action arising from facts which would support a habeas corpus challenge, if the prisoner seeks only damages, declaratory judgment as a predicate to a damage award, or injunctive relief other than an injunction shortening the duration of confinement.   See Wolff v. McDonnell, 418 U.S. 539, 554-55 (1974);   Ybarra v. Reno Thunderbird Mobile Home Village, 723 F.2d 675, 681-82 (9th Cir.1984).


4
When a prisoner files a habeas corpus petition that presents claims cognizable under Sec. 1983, the district court should construe those claims as a Sec. 1983 complaint.   Wilwording v. Swenson, 404 U.S. 249, 251 (1971) (per curiam);   Hansen v. May, 502 F.2d 728, 729-30 (9th Cir.1974).  If a prisoner seeks both release from confinement and damages or injunctive relief, the court must dismiss any unexhausted habeas claims but may retain the civil rights claims.   See Wolff, 418 U.S. at 554-55;   Ybarra, 723 F.2d at 681-82.1


5
Here, Jauregui seeks both release from confinement and prospective injunctive relief.  To the extent that Jauregui is challenging the duration of his confinement, Jauregui concedes that he never presented his claims to the Arizona Supreme Court.  Thus, the district court properly dismissed this portion of Jauregui's habeas petition for failure to exhaust state remedies.  See 28 U.S.C. Sec. 2254(b);   Henry, 993 F.2d at 1425.


6
However, Jauregui also contends that he is unable to obtain the necessary documents from his state criminal proceedings in order to pursue his postconviction remedies.  To the extent that Jauregui is requesting injunctive relief to obtain these documents, he is seeking relief which is properly brought under Sec. 1983 because the release of these documents will not require Jauregui's immediate release.   See Wolff, 418 U.S. at 554-55 (prisoner may seek injunction through Sec. 1983 action other than an injunction affecting the duration of confinement);  cf. Heck, 62 U.S.L.W. at 4595-96 (state prisoner challenging conviction does not state cognizable Sec. 1983 claim unless and until conviction invalidated).  The district court should have construed this portion of Jauregui's petition as a civil rights claim.   See Wilwording, 404 U.S. at 251;   Hansen, 502 F.2d at 729-30.  Accordingly, we vacate this portion of the district court's dismissal order, and remand for the district court to consider the merits of Jauregui's civil rights claim.   See Badea, 931 F.2d at 575 n. 2.


7
AFFIRMED IN PART;  VACATED AND REMANDED IN PART.

