Lawrence and Deborah Anderson appeal from an order of the district court granting summary judgment in favor of Wendy P. Schultz, State’s Attorney for Stutsmen County, North Dakota. As the district court should have abstained from deciding this case, we reverse its judgment.
BACKGROUND
The Andersons wish to provide a Christian education for their children. They allege that their religious convictions require them to conduct this education in their home. Under North Dakota laws, parents must send their school-age children to either a public . school, N.D.Cent.Code § 15-34.1-01 (1981), or to a state approved private or parochial school. N.D.Cent.Code § 15-34.1-03 (Supp.1987). As North Dakota has no legislation specifically dealing *764with home schools, they are considered private schools under this statute, and as such they cannot be approved by the state unless the teachers are legally certified. N.D.Cent.Code § 15-34.1-03(1). If parents fail to comply with these requirements, they may be prosecuted and found guilty of an infraction. N.D.Cent.Code § 15-34.1-05 (1981).
In the fall of 1986, the Andersons stopped sending their children to an approved school because they felt that educating their children at home was the only way to provide an acceptable and affordable Christian education.
On September 12, 1986, the Andersons filed a section 1983 action in federal district court, seeking a declaratory judgment that the North Dakota compulsory school attendance law violated the United States Constitution, and an injunction to prevent the state from enforcing the law against them. On the same day, criminal charges were filed against the Andersons in state court. The state trial occurred on May 7 and 8, 1987 in which the Andersons raised their federal constitutional claims. The trial court rejected their claims and entered a judgment of guilty on July 13, 1987. They then appealed from their convictions to the North Dakota Supreme Court.
Meanwhile, the federal civil rights action continued. On December 11, 1987, a magistrate issued a report and recommendation rejecting the state’s request for abstention under Younger v. Harris, 401 U.S. 37, 91 S.Ct. 746, 27 L.Ed.2d 669 (1974) because of the likelihood that the Andersons would be prosecuted again for their failure to comply with the state law. The magistrate recommended, however, that summary judgment be granted to Schultz on the merits because the requirement that all teachers be legally certified did not violate the free exercise clause, the establishment clause or the due process clause of the United States Constitution. On March 18, 1988, the district court adopted this recommendation and granted summary judgment in favor of Schultz.
Since that time, the North Dakota Supreme Court reviewed the Andersons’ convictions and also rejected their federal constitutional claims in an opinion filed June 28, 1988. The United States Supreme Court denied certiorari in the Anderson’s criminal appeal on November 28, 1988.
DISCUSSION
As a criminal proceeding was pending against the Andersons at the time the district court considered their federal constitutional claims, we believe a review of the Younger abstention doctrine is necessary to determine the propriety of deciding this case on the merits.
In Younger v. Harris, supra, the Supreme Court held that principles of equity, comity and federalism dictate that federal courts should generally refrain from enjoining ongoing state criminal proceedings, absent extraordinary circumstances where the danger of irreparable injury to the federal plaintiff is both great and immediate. Id., 401 U.S. at 46, 91 S.Ct. at 751. The Younger doctrine applies whether the federal plaintiff seeks injunctive or declaratory relief, Samuels v. Mackell, 401 U.S. 66, 73, 91 S.Ct. 764, 768, 27 L.Ed.2d 688 (1971), but only if the federal post-trial intervention would annul the results of the state proceedings. Sartin v. Commissioner of Public Safety of the State of Minnesota, 535 F.2d 430, 433 (8th Cir.1976). If the federal plaintiff seeks to annul the results of a state trial through a section 1983 action, he or she must first exhaust any state appellate remedies before resorting to a federal forum. Huffman v. Pursue, Ltd., 420 U.S. 592, 606, 95 S.Ct. 1200, 1209, 43 L.Ed.2d 482 (1975).
We agree with the magistrate that federal abstention under the Younger doctrine must be considered in this case. We disagree, however, with her conclusion that this case presents an “extraordinary exception” to the Younger rule. The Andersons’ federal claim was filed on the same day as the state criminal charges against them were filed in state court. The state trial and conviction occurred before any proceeding of substance took place in federal court. As the Supreme Court held in Hicks v. Miranda, 422 U.S. 332, 349, 95 S.Ct. 2281, 2291, 45 L.Ed.2d 223 (1975), if the *765state criminal proceeding is begun after the federal complaint is filed but before any proceedings of substance on the merits have taken place in federal court, the Younger doctrine applies in full force. Thus, the magistrate correctly held the Younger doctrine applicable to this case.
In its report and recommendation, however, the magistrate felt that an exception was warranted in this case because the Andersons would probably be prosecuted again under the compulsory school attendance law. We disagree that the threat of future prosecution constitutes great and immediate irreparable injury under Younger. In discussing the meaning of “irreparable injury,” the Younger Court stated:
[T]he Court stressed the importance of showing irreparable injury, the traditional prerequisite to obtaining an injunction. In addition, however, the Court also made clear that in view of the fundamental policy against federal interference with state criminal prosecutions, even irreparable injury is insufficient unless it is “both great and immediate.” Certain types of injury, in particular, the cost, anxiety, and inconvenience of having to defend against a single criminal prosecution, could not by themselves be considered “irreparable” in the special legal sense of that term. Instead, the threat to the ‘plaintiffs federally protected rights must be one that cannot be eliminated by his defense against a single criminal prosecution.
401 U.S. at 46, 91 S.Ct. at 751 (citations omitted, emphasis added).
If a federal plaintiff has an opportunity to raise his or her constitutional claims in the state criminal proceeding, or the federal plaintiff cannot prove bad faith or harassment in the state prosecution, equitable relief is unwarranted even if the state statute is unconstitutional. Younger, at 49, 91 S.Ct. at 753; Dombrowski v. Pfister, 380 U.S. 479, 485, 85 S.Ct. 1116, 1120, 14 L.Ed.2d 22 (1965); Douglas v. City of Jeannette, 319 U.S. 157, 164, 63 S.Ct. 877, 881, 87 L.Ed. 1324 (1943); Lewellen v. Raff 843 F.2d 1103, 1109 (8th Cir.), reh’g denied, 851 F.2d 1108 (1988) (per curiam), cert. denied, — U.S. -, 109 S.Ct. 1171, 103 L.Ed.2d 229 (1989); MTM, Inc. v. Baxley, 523 F.2d 1255, 1257 (5th Cir.1975); Moore v. DeYoung, 515 F.2d 437, 448 (3d Cir.1975).
After a careful review of the record, we find no evidence to suggest that the state court prosecution was brought in bad faith or to harass the Andersons for exercising their religious beliefs by educating their children at home. Furthermore, the record is clear that the Andersons raised their federal constitutional claims before the state trial court, the state supreme court and the United States Supreme Court. We do not believe the Andersons demonstrated any injury other than “that incidental to every criminal proceeding brought lawfully and in good faith.” See Younger, 401 U.S. at 49, 91 S.Ct. at 753.
We recognize that at this time, the state proceedings against the Andersons are closed. We also acknowledge that the Andersons now seek only to be free from prosecution for future violations of the state statute and have not sought in this Court to have their record expunged. If a federal plaintiff comes to federal court only seeking such prospective relief, Younger does not bar federal jurisdiction. Wooley v. Maynard, 430 U.S. 705, 711, 97 S.Ct. 1428, 1433, 51 L.Ed.2d 752 (1977). Arguably, there would appear to be no need to defer to the principles of comity recognized in Younger.
The applicability of Younger, however, does not turn on what effect our decision might have on a state proceeding. Rather, the focus is whether post-trial intervention by the district court would have interfered with the state proceeding. At the time the district court considered Schultz’ summary judgment motion, the Andersons’ appeal was pending in the state supreme court. A decision by the district court in favor of the Andersons would have raised serious questions as to the effect of a contrary state supreme court decision. Such a situation is exactly what the Supreme Court wanted to avoid by creating the Younger abstention doctrine. Thus, we find that the district court should have abstained from deciding *766the Andersons’ federal constitutional claims. We do not reach the issue of what preclusive effect the North Dakota Supreme Court decision might have on a future section 1983 action in which the Andersons seek only prospective relief.
We therefore vacate the district court’s judgment and remand to the district court to enter an order dismissing the case without prejudice. See Caldwell v. Camp, 594 F.2d 705, 708 (8th Cir.1979) (dismissal without prejudice is appropriate when district court abstains under Younger).