ORDER OF DISMISSAL WITHOUT PREJUDICE
KANDIS A. WESTMORE, Magistrate Judge.
Plaintiff, an inmate incarcerated at Santa Rita County Jail, filed the present pro se prisoner complaint under 42 U.S.C. § 1983. His complaint challenges his detention based on allegations that he has been held in jail since 2010 on "charges that have been disproved, and it is a total fabrication of the D.A." Compl. at 3. Plaintiff claims that Defendant, his court appointed attorney, has blocked Plaintiff's appearance in court on seven occasions. Plaintiff alleges that he has asked the trial court to appoint different counsel to represent him, but the court has not responded. Plaintiff' seeks damages for his financial loss due to his imprisonment and a hearing by the trial court on the alleged fictitious charges against him. He also requests leave to proceed in forma pauperis. Plaintiff has consented to the jurisdiction of the undersigned United States Magistrate Judge over this action.
A. Preliminary Review of Complaint
Federal courts must engage in a preliminary screening of cases in which prisoners seek redress from a governmental entity or officer or employee of a governmental entity. 28 U.S.C. § 1915A(a). In its review the court must identify any cognizable claims, and dismiss any claims which are frivolous, malicious, fail to state a claim upon which relief may be granted, or seek monetary relief from a defendant who is immune from such relief. Id. at 1915A(b)(1), (2). Pro se pleadings must be liberally construed. Balistreri v. Pacifica Police Dep't, 901 F.2d 696, 699 (9th Cir. 1990).
To state a claim under 42 U.S.C. § 1983, a plaintiff must allege two essential elements: (1) that a violation of a right secured by the Constitution or laws of the United States was violated, and (2) that the alleged deprivation was committed by a person acting under the color of state law. West v. Atkins, 487 U.S. 42, 48 (1988).
B. Plaintiff's Allegations
In this case, Plaintiff has improperly filed his claim as a civil rights action. Traditionally, challenges to prison conditions have been cognizable only via § 1983, while challenges implicating the fact or duration of confinement must be brought through a habeas petition. Docken v. Chase, 393 F.3d 1024, 1026 (9th Cir. 2004).
Any claim by a prisoner attacking the validity or duration of his confinement must be brought under the habeas sections of Title 28 of the United States Code. Calderon v. Ashmus, 523 U.S. 740, 747 (1998); Preiser v. Rodriguez, 411 U.S. 475, 500 (1973). A prisoner must bring a habeas petition if the nature of his claim is such that it would necessarily imply the invalidity of his conviction or continuing confinement. Butterfield v. Bail, 120 F.3d 1023, 1024 (9th Cir. 1997) (§ 1983 claim).
A district court may construe a habeas petition by a prisoner attacking the conditions of his confinement as a civil rights action under 42 U.S.C. § 1983. Wilwording v. Swenson, 404 U.S. 249, 251 (1971). The opposite is not true, however: a civil rights complaint seeking habeas relief should be dismissed without prejudice to bringing it as a petition for writ of habeas corpus. Trimble v. City of Santa Rosa, 49 F.3d 583, 586 (9th Cir. 1995).
Plaintiff's allegations attack the invalidity of his confinement rather than the conditions of his confinement. Therefore, he has failed to state a cognizable claim under section 1983. Accordingly, the instant complaint is DISMISSED without prejudice to refiling as a petition for a writ of habeas corpus. If Plaintiff is a pre-trial detainee, a habeas petition may be submitted pursuant to 28 U.S.C. § 2241. See Hoyle v. Ada County, 501 F.3d 1053, 1058 (9th Cir. 2007) (habeas petition under § 2241 is appropriate vehicle for a challenge to a person's detention when the person is in custody, but not pursuant to the judgment of a state court, e.g., it is the appropriate basis for a challenge to detention by a pretrial detainee). If Plaintiff has been convicted and a judgment against him has issued, he may bring a habeas petition pursuant to 28 U.S.C. § 2254.
C. Motion for Leave to Proceed In Forma Pauperis
Because this civil action was filed in error, Plaintiff s motion to proceed in forma pauperis is denied as moot. The Clerk of the Court shall ...