983 F.2d 1075
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.Joel W. ELLINGTON, Dr., Plaintiff-Appellant,v.Nancy OESTERLE;  Rex A. Bell, Defendants-Appellees.
No. 92-15193.
United States Court of Appeals, Ninth Circuit.
Submitted Nov. 13, 1992.*Decided Dec. 29, 1992.

Before CHOY, SNEED and SKOPIL, Circuit Judges:


1
MEMORANDUM**


2
Joel Ellington, a Nevada state prisoner, appeals pro se the district court's sua sponte dismissal of his 42 U.S.C. § 1983 civil rights complaint against a state court justice of the peace and a district attorney.   He contends that the district court erred in dismissing his complaint as frivolous under 28 U.S.C. § 1915(d).   We conclude that the district court should have construed Ellington's complaint as a petition for writ of habeas corpus.   Remand is not necessary, however, because it is clear from Ellington's complaint that he has not exhausted available state remedies.   Accordingly, we affirm.

DISCUSSION

3
As a threshold matter, we note that ordinarily the dismissal of a complaint is not considered a final appealable order under 28 U.S.C. § 1291.   California v. Harvier, 700 F.2d 1217, 1218 (9th Cir.), cert. denied, 464 U.S. 820 (1983).   Here, however, the district court's dismissal of Ellington's complaint as frivolous disposed of the entire action, and implied that no amendment could be made to save his action.   Therefore, we assert jurisdiction.


4
Ellington alleges in his complaint that he was deprived of a fair hearing because the justice of the peace ordered him gagged with duct tape and bound with handcuffs during his preliminary hearing in state court.   He also alleges that he received ineffective assistance of counsel, was not allowed to cross-examine witnesses, and that the court erred by denying appointment of new counsel and his request to proceed pro se.   He does not seek monetary damages but seeks to be released from custody.


5
The district court addressed only Ellington's first claim and held that the defendants were entitled to absolute immunity for the judicial and quasi-judicial actions taken within the scope of their authority.   Judicial and prosecutorial immunity, however, do not extend to declaratory or injunctive relief in section 1983 actions.   Gobel v. Maricopa County, 867 F.2d 1201, 1203 n. 6 (9th Cir.1989);   Ashelman v. Pope, 793 F.2d 1072, 1075 (9th Cir.1986) (en banc).   Because Ellington did not request money damages, the district court erred in dismissing on immunity grounds.


6
The district court should have construed the complaint as a petition for a writ of habeas corpus.   See Franklin v. Oregon, 662 F.2d 1337, 1347-48 & n. 13 (9th Cir.1981);   Bennett v. Allen, 396 F.2d 788, 790 (9th Cir.1968).   Because Ellington challenges only the fact of his confinement and seeks a determination that he is entitled to immediate release from prison, his sole federal remedy is a writ of habeas corpus.   See Preiser v. Rodriguez, 411 U.S. 475, 500 (1973).   A remand to the district court is not necessary, however, because from the face of Ellington's complaint, it is clear that he has not exhausted available state remedies and therefore a federal habeas claim is premature.   See 28 U.S.C. § 2254(b);   McQuown v. McCartney, 795 F.2d 807, 809 (9th Cir.1986) (per curiam).   Ellington's complaint expressly states that he has not filed a lawsuit in state or federal court and that although he sent a petition for writ of habeas corpus to the second judicial district court for Nevada at Las Vegas, it was not filed.


7
Ellington also raises for the first time on appeal numerous new issues.   His failure to raise these issues before the district court precludes our review on appeal.   See Willard v. California, 812 F.2d 461, 465 (9th Cir.1987).


8
AFFIRMED.



*
 The panel unanimously finds this case suitable for submission on the record and briefs and without oral argument.   Fed.R.App.P. 34(a), Ninth Circuit Rule 34-4


**
 This disposition is not appropriate for publication and may not be cited to or by the courts of this circuit except as provided by Ninth Circuit Rule 36-3


