Rodriguez’s state court action, asserting various wrongful discharge claims and claims for intentional and negligent infliction of emotional distress, was removed on the basis of preemption under federal labor laws. The district judge granted summary judgment against Rodriguez on all claims except the claim for intentional infliction of emotional distress, which she remanded to state court. The defendants petition for a writ of mandamus to compel the district court to retain jurisdiction of that claim.
We first face the procedural issues of whether the remand order is reviewable at all and, if so, whether the review should be by appeal or mandamus. We hold that the remand is not appealable, but can be reviewed as a request for a writ of mandamus. The substantive issue in the case is whether the claim for intentional infliction of emotional distress was properly remanded.
I.
FACTS
Rodriguez’s suit in state court against Whittaker alleged various wrongful discharge claims, intentional infliction of emotional distress, and negligent infliction of emotional distress. Whittaker removed the case to federal court and moved for summary judgment, alleging that each cause of action was preempted by the National Labor Relations Act, and that the statute of limitations had run on these federal claims.
Rodriguez conceded that five of her claims were preempted, but argued that her claim for intentional infliction of emotional distress was not preempted, as it was based on state law. Given Rodriguez’s stipulation, the district court granted summary judgment as to the other five claims.
The district court then denied the motion for summary judgment on the claim of intentional infliction of emotional distress. An emotional distress claim asserted under state law is not preempted if it is “unrelated to employment discrimination or a function of the particularly abusive manner in which the discrimination is accomplished or threatened rather than a function of the actual or threatened discrimination itself.’’ Farmer v. United Bhd. of Carpenters and Joiners of America, 430 U.S. 290, 305, 97 S.Ct. 1056, 1066, 51 L.Ed.2d 338 (1977). The district court found that several of the facts alleged in Rodriguez’s claim would support this type of state cause of action for outrageous conduct, which is not preempted, including claims that Rodriguez was held in a work area against her will by *1418threat of physical force and was requested to commit lewd sexual acts.
The district court then remanded this emotional distress claim to state court. Whittaker requests a writ of mandamus to vacate this remand.
II.
REVIEW OF A REMAND ORDER
An order remanding an action, if reviewable at all, is ordinarily reviewed by mandamus. Thermtron Products, Inc. v. Hermansdorfer, 423 U.S. 336, 352-53, 96 S.Ct. 584, 593-94, 46 L.Ed.2d 542 (1976). However, if a case is remanded on the ground that removal was improvident and without jurisdiction, 28 U.S.C. § 1447(c) (1982), the remand order “is not reviewable on appeal or otherwise.” 28 U.S.C. § 1447(d) (1982); Thermtron, 423 U.S. at 346, 96 S.Ct. at 590.
Here, remand could not possibly have been based on section 1447(c); removal had not been “without jurisdiction,” since five of Rodriguez’s claims were held to be preempted by federal law. The statutory preclusion of review under section 1447(d) is therefore not applicable.
A question exists as to whether the order is reviewable by direct appeal, because the requested extraordinary review by mandamus is not available if review can be obtained by appeal. Moses H. Cone Memorial Hosp. v. Mercury Constr. Corp., 460 U.S. 1, 8 n. 6, 103 S.Ct. 927, 933 n. 6, 74 L.Ed.2d 765 (1983). We have held that a remand order may be reviewed on appeal as a final collateral order under 28 U.S.C. § 1291 if the order resolves the merits of a matter of substantive law apart from any jurisdictional decision. Clorox Co. v. U.S. District Court, 779 F.2d 517, 520 (9th Cir.1985); Pelleport Investors, Inc. v. Budco Quality Theatres, Inc., 741 F.2d 273, 276-78 (9th Cir.1984).
In this case, the order of remand did not resolve a matter of substantive law, as in Pelleport or Clorox. The ruling of the district court was that the state cause of action alleged in Rodriguez’s complaint was not an artfully pled federal claim that was preempted by federal labor law. This did not finally resolve the issue of preemption, which could still be raised as a defense to the state claim in the state court. Thus, if the proof in state court were such as to justify the conclusion that the cause of action was completely preempted by federal labor law, the defense of preemption could be sustained. The ruling of the district court was simply that the allegations of the complaint did not justify such a result.
Thus, the only issue decided by the remand order is the jurisdictional issue, that the claim of intentional infliction of emotional distress was a state claim and not an artfully pled federal claim. The district judge then exercised her discretion in remanding that state claim. Therefore, the remand is not reviewable on appeal as a substantive decision under the doctrine of Pelleport and Clorox. The only avenue of review available is by mandamus under the authority of Thermtron.
III.
ISSUANCE OF A WRIT OF MANDAMUS
The issuance of a writ of mandamus is an extraordinary remedy available to the courts of appeal under 28 U.S.C. § 1651 (1982). Will v. United States, 389 U.S. 90, 95, 88 S.Ct. 269, 273, 19 L.Ed.2d 305 (1967). In Bauman v. U.S. District Court, 557 F.2d 650, 654-55 (9th Cir.1977), we set forth guidelines for when the issuance of a writ of mandamus is appropriate. Although several indicators are specified for consideration in Bauman, one factor is determinative in this case. When the district court's order is correct as a matter of law, it is obvious that the writ of mandamus should not be issued.1
*1419The Supreme Court’s holding in Farmer v. Carpenters, 430 U.S. at 305, 97 S.Ct. at 1066, that a state claim for infliction of emotional distress is not preempted if it was the result of particularly abusive conduct, provides a sound basis for the district court’s conclusion that the complaint alleged a non-preempted state claim. The allegations of the complaint, if proved, could sustain a finding that the conduct was outrageous, and thus the claim was not preempted. The district judge’s holding was correct that a non-preempted state claim was alleged.
While a federal court has jurisdiction to retain and decide a state claim that is not independently removable, once the federal claim upon which removal was based is gone, it is within the discretion of the district court to remand the state claim to the state court from which it was removed. Swett v. Schenk, 792 F.2d 1447, 1450 (9th Cir.1986).2
The petition for a writ of mandamus is denied.
. The guidelines enumerated in Bauman are (1) The party seeking the writ has no other adequate means to obtain the desired relief, such as a direct appeal; (2) The petitioner will be prejudiced or damaged in a manner not correctable on appeal; (3) The district court’s order is clearly erroneous as a matter of law; (4) The district court's order represents an error often made, or *1419is indicative of a persistent disregard of the federal rules; and (5) The district court’s order involves new and important issues, generally of first impression. All of these guidelines need not be met and they may not all be applicable in any one case. Bauman, 557 F.2d at 655. With regard to the first two factors, we have noted that Rodriguez has no other avenue of review in federal court; however, the issue of preemption remains open for determination and review in state court. The third factor is determinative. It is apparent that if the district court’s legal conclusion is correct, the fourth and fifth enumerated factors become irrelevant.
. We recognize that the circuits are not in agreement as to the availability of remand for pendent claims, and that the Supreme Court has granted certiorari on this issue. Carnegie-Mellon Univ., et al. v. Cohill, — U.S. -, 107 S.Ct. 1283, 94 L.Ed.2d 141 (1987). The relevant test, however, is whether the district court court’s order was clearly erroneous as a matter of law. Given the Ninth Circuit authority allowing remand under the circumstances of this case, the remand order was obviously not clearly erroneous.