D.C. No. CV-96-04040-WJR Petition for Writ of Mandamus Argued and Submitted November 25, 1997--San Francisco, California
Before: Betty B. Fletcher, Jerome Farris and Alex Kozinski, Circuit Judges.
The opinion of the court was delivered by: Opinion by Judge Kozinski
Kelvin Shelby Malone, currently incarcerated in California, is under sentence of death both in that state and in Missouri. His federal habeas petition in California is in its initial stages. By contrast, habeas review of Malone's Missouri conviction and sentence is almost complete; the Eighth Circuit has the case under submission. Because Malone's Missouri execution date may be imminent, the governor of Missouri made a for- mal request to the governor of California asking that Malone be released into Missouri's custody. See Uniform Criminal Extradition Act, Cal. Penal Code SS 1547-1556.2 and Mo. Rev. Stat. SS 548.011-548.300. The governor of California agreed and the two entered into an executive agreement pro- viding for Malone's extradition to Missouri. Malone unsuc- cessfully challenged the extradition in California state court and also sought a stay from the district court with jurisdiction over his California-based habeas petition. The district court granted the requested relief; it entered an order staying the extradition unless certain conditions were met (most notably, that Missouri submit to the district court's jurisdiction). In its petition for a writ of mandamus California seeks to have that ruling reversed.
 Mandamus is not to be used as a substitute for an appeal: " court of appeals has no occasion to engage in extraordinary review by mandamus . . . when it can exercise the same review by a contemporaneous ordinary appeal." Moses H. Cone Mem'l Hosp. v. Mercury Constr. Corp., 460 U.S. 1, 8 n.6 (1983). See also Calderon v. United States Dist. Court, 1998 WL 24138 at *2 (9th Cir. Jan. 26, 1998) (manda- mus not available when petitioner could have filed direct appeal); Herrington v. County of Sonoma, 706 F.2d 938, 940 (9th Cir. 1983) (same); Bauman v. United States Dist. Court, 557 F.2d 650, 654 (9th Cir. 1977) (same). The district court's order was not a final judgment, so the state could not have appealed it under 28 U.S.C. S 1291. But was it the kind of interlocutory order that could have been appealed as of right pursuant to 28 U.S.C. S 1292?
 Under 28 U.S.C. S 1292(a)(1) interlocutory injunctions are immediately appealable.*fn1 That the district court here did not label its order an injunction is not dispositive. In deter- mining whether an order is appealable under section 1292(a) (1), we consider the substantial effect of the order. See Tagupa v. East-West Ctr., Inc., 642 F.2d 1127, 1129 (9th Cir. 1981) (looking not to form of district court's order but to its actual effect); Santana Prods., Inc. v. Compression Polymers, Inc., 8 F.3d 152, 154 (3rd Cir. 1993) (same); Sierra Club v. Marsh, 907 F.2d 210, 213 (1st Cir. 1990) (same); 11A Charles Alan Wright et. al., Federal Practice and Procedure, S 2962 (2d ed. 1995) (same).
 At Malone's request, the district court entered an order prohibiting California from turning him over to Missouri. Were the state to ignore the order and release Malone into Missouri's custody, it could surely be brought before the dis- trict court to answer contempt charges. This order thus restrains a party, on penalty of contempt, from taking an action that it could otherwise take. We have no trouble con- cluding that the order is in fact an injunction. Had California filed a timely notice of appeal, we would have had jurisdic- tion pursuant to 28 U.S.C. S 1292(a)(1).*fn2
 Because California could have obtained review of the district court's order through an ordinary appeal, mandamus is not available. Had the state filed its mandamus petition within the time allowed for filing a notice of appeal, we would have treated it as a notice of appeal and reached the merits. See Helstoski v. Meanor, 442 U.S. 500, 508 n.4 (1979); Diamond v. United States Dist. Court, 661 F.2d 1198, 1198-99 (9th Cir. 1981). But it did not.*fn3 The state is thus in the same unhappy position as other litigants who failed to comply with jurisdictional requirements for perfecting an appeal. See Pratt v. McCarthy, 850 F.2d 590, 591 (9th Cir. 1988), overruled on other grounds Pioneer Inv. Servs. Co. v. Brunswick Assoc. Ltd. Partnership, 507 U.S. 380 (1993); Mann v. Lynaugh, 840 F.2d 1194, 1197 (5th Cir. 1988). While we harbor serious doubts about the district court's order, it is not reviewable by writ of mandamus.