
527 N.W.2d 830 (1995)
Diane McGOWAN, Respondent,
v.
OUR SAVIOR'S LUTHERAN CHURCH, Petitioner, Appellant.
Nos. C2-94-446, C4-94-447.
Supreme Court of Minnesota.
February 17, 1995.
*831 Eric J. Magnuson, Sarah E. Morris, Minneapolis, for appellant.
James C. Wicka, Leanne G. Litfin, Minneapolis, for respondent.
Heard, considered and decided by the court en banc.

OPINION
PAGE, Justice.
Diane McGowan commenced this negligence action seeking damages for injuries she sustained as a result of being raped while working as director of the homeless shelter at Our Savior's Lutheran Church. The church, arguing that the Minnesota Workers' Compensation Act[1] barred the lawsuit, sought to have it dismissed on summary judgment based on the district court's lack of subject matter jurisdiction. In response, McGowan argued that her injuries were excluded from coverage under the Act by Minn. Stat. § 176.011, subd. 16 (1994),[2] commonly referred to as the "assault exception" to the Act, because she was the victim of an intentional assault that was personal to her and unrelated to her employment.
The district court denied the church's motion, finding a genuine issue of material fact existed regarding the assailant's motive for the attack. The court also concluded there was a question as to whether the "assault exception" to the Act applied in this case. The church filed a direct appeal and a petition for discretionary review in the court of appeals. The court of appeals dismissed the direct appeal, holding that it was an appeal from a nonappealable order, and denied the petition for discretionary review.
The church raises two issues for our consideration, one procedural and one substantive. Procedurally, we are asked to decide whether an order denying an employer's motion for summary judgment in an employee's negligence action is immediately appealable when dismissal of the action is sought based on the district court's lack of subject matter jurisdiction. We are next asked to decide whether the district court lacks subject matter jurisdiction over this negligence action. We hold that an order denying summary judgment in an employee's negligence action is immediately appealable when dismissal is *832 sought based on the district court's lack of subject matter jurisdiction. We also hold the district court lacks subject matter jurisdiction over this negligence action because the injuries that form the basis for McGowan's claim do not fall within the assault exception to the Workers' Compensation Act. We reverse the court of appeals.
On April 4, 1989, while working in her office at the church's homeless shelter, McGowan was raped by a shelter client, Eulalio Hernandez-Perez. McGowan had come into contact with her assailant on two occasions prior to the rape. Each of these contacts occurred at the shelter in conjunction with her work responsibilities. McGowan never had any contact with Hernandez-Perez away from the shelter. Her first encounter with him was on March 27, 1989, when he entered her office to see a social worker from the Homeless Assistance Project. Her second encounter was a day or two later when he entered her office and offered to teach her and other staff members how to speak Spanish. While in the office on that second occasion, Hernandez-Perez made McGowan feel uncomfortable by sitting too close to her.[3] At some point, Hernandez-Perez touched McGowan's arm, prompting one of the male staff members to reprimand him and tell him not to touch her again. After this incident, McGowan informed all of the staff members that she did not want to be left alone with Hernandez-Perez.
On the afternoon of April 4, 1989, the church custodian came to McGowan's office shortly after she returned from a meeting and told her the pastor was having trouble with a disruptive man in the assembly hall. The man was Hernandez-Perez. In an attempt to defuse the situation, McGowan escorted Hernandez-Perez to her office to talk to him for a few minutes. While there, he became upset, pulled the phone cord out of the wall, closed the office door which locked automatically, and raped her.
The first issue we must address is whether the district court order denying the church's motion for summary judgment is appealable. Generally, an order denying a motion for summary judgment is not appealable unless the district court certifies the question presented as important and doubtful. Minn.R.Civ.App.P. 103.03. Here, the district court declined to certify the question presented. An exception to the general rule exists where the motion denied is based on governmental immunity from suit. Anderson v. City of Hopkins, 393 N.W.2d 363, 364 (Minn.1986) (order is appealable if the motion for summary judgment is based on a claim of governmental immunity from suit). Similarly, immediate appeal is permitted where a motion to dismiss for lack of personal jurisdiction is denied. Hunt v. Nevada State Bank, 285 Minn. 77, 88-89, 172 N.W.2d 292, 300 (1969) (order denying motion to dismiss for lack of personal jurisdiction is appealable as of right), cert. denied, 397 U.S. 1010, 90 S.Ct. 1239, 25 L.Ed.2d 423 (1970).
The rationale behind allowing immediate review of an order denying dismissal based on governmental immunity is that government officials entitled to immunity should not be forced to endure the expense and delay of proceeding to trial. Mitchell v. Forsyth, 472 U.S. 511, 526, 105 S.Ct. 2806, 2815-16, 86 L.Ed.2d 411 (1985). In Mitchell, the Court concluded that an order denying summary judgment is appealable if the issue "falls within `that small class which finally determine claims of right separable from, and collateral to, rights asserted in the action, too important to be denied review and too independent of the cause itself to require that appellate consideration be deferred until the whole case is adjudicated.'" Id. at 524-25, 105 S.Ct. at 2814 (quoting Cohen v. Beneficial Indus. Loan Corp., 337 U.S. 541, 546, 69 S.Ct. 1221, 1225-26, 93 L.Ed. 1528 (1949)). The Court went on to note that immunity "is effectively lost if a case is erroneously permitted to go to trial." Mitchell, 472 U.S. at 526, 105 S.Ct. at 2815. Our decision in Anderson flows directly from the Court's decision in Mitchell.
In Hunt, we relied on essentially the same rationale in concluding that an order denying *833 a motion to dismiss for lack of personal jurisdiction was immediately appealable. We stated, "[i]t is more realistic to view such an order not merely as a retention of an action for trial, but as a determination of right, for a defendant is compelled thereby to take up the burden of litigation in this state that might otherwise be avoided." Hunt, 285 Minn. at 89, 172 N.W.2d at 300.
Consistent with the rationale underlying our decisions in Anderson and Hunt, the denial of a motion based on subject matter jurisdiction should not be treated differently. The issue raised by the church's motion falls into "that small class which finally determine claims of right, separable from, and collateral to, rights asserted in the action, too important to be denied review and too independent of the cause itself to require that appellate consideration be deferred until the whole case is adjudicated." Mitchell, 472 U.S. at 524-25, 105 S.Ct. at 2814 (quoting Cohen, 337 U.S. at 546, 69 S.Ct. at 1225-26). If the district court here lacks jurisdiction over the subject matter, no purpose is served by putting the parties or the court through the rigors of trial before that determination is made. The order denying the church's motion is immediately appealable because if McGowan's claim falls within the scope of the Workers' Compensation Act the district court is without jurisdiction to proceed further.[4]
Having concluded the district court's order is appealable, we now turn to the substantive issue presented. Workers' compensation was created to ensure prompt and certain compensation for injuries suffered in the workplace. Minn.Stat. § 176.001 (1994). Under the Act, employers are required to "pay compensation in every case of personal injury or death of an employee arising out of and in the course of employment without regard to the question of negligence." Minn. Stat. § 176.021, subd. 1 (1994). If an employee suffers a personal injury or death arising out of and in the course of her employment, the Act provides the employee's exclusive remedy. Minn.Stat. § 176.031 (1994). Where the Act provides the employee's exclusive remedy, the district courts have no jurisdiction. Huhn v. Foley Bros., 221 Minn. 279, 22 N.W.2d 3 (1946) (interpreting Longshoremen's and Harbor Workers' Compensation Act, 33 U.S.C. §§ 901-950 (1940)).
McGowan argues that when Hernandez-Perez's subjective intent is examined, it is clear he raped her for purely personal reasons unrelated to her work. She further argues that her injuries do not constitute a personal injury under the Act because they are excluded from coverage by the Act's "assault exception." According to McGowan, the following facts support her contention that Hernandez-Perez's subjective intent was to assault her for personal reasons: Hernandez-Perez was known to her prior to the assault; he developed a personal interest in her; he made personal advances toward her, as evidenced by his sitting close to her and touching her; his advances were rebuffed; and when rebuffed, he developed a personal animosity toward her which became the motivating factor behind the rape.
In response, the church contends McGowan's allegations that her injuries arose out of her employer's negligence lead directly and inescapably to the conclusion that her injuries occurred because of her employment. The church also argues that McGowan has presented no evidence relating to her assailant's subjective intent, or which establishes that the rape was motivated by personal animosity unrelated to her employment. Finally, the church suggests it is impossible for McGowan to establish personal motivation on her assailant's part inasmuch as she has already conceded her only encounters with him arose from her employment at the shelter.
The Act excludes from coverage injuries "caused by the act of a third person or fellow employee intended to injure the employee because of personal reasons, and not directed against the employee as an employee, or because of the employment." Minn. Stat. § 176.011, subd. 16 (emphasis added). *834 As we have said before, assault cases generally fall into three categories: (1) those that are noncompensable under the Act because the assailant was motivated by personal animosity toward his victim, arising from circumstances wholly unconnected with the employment; (2) those that are compensable under the Act because the provocation or motivation for the assault arises solely out of the activity of the victim as an employee; and (3) those that are compensable under the Act because they are neither directed against the victim as an employee nor for reasons personal to the employee. Hanson v. Robitshek-Schneider Co., 209 Minn. 596, 600, 297 N.W. 19, 22 (1941).
Based on the record before us, we conclude McGowan's injuries are covered under the Act because they resulted from an assault arising solely out of McGowan's activities as an employee. "While it may be admitted that there is no clearer example of non-industrial motive than rape, it is equally clear * * * that employment that requires women to be in isolated places is a causal factor contributing to such an attack." 1 Arthur Larson & Lex K. Larson, The Law of Workmen's Compensation, § 11.11(b) at 3-197 to 3-198 (1994) (footnote omitted). It is also equally clear that McGowan's employment was a causal factor contributing to her being raped. At the time she was raped, McGowan was the shelter's director and had never had any contact with her assailant outside the workplace. Further, the assault occurred during working hours, in her office, while she was directly engaged in the performance of her work duties. Based on these facts, we cannot say that the rape arose from circumstances unrelated to McGowan's employment.
Thus, McGowan's negligence action is barred by the exclusive remedy provision of the Act and the church is entitled to dismissal.
Reversed.
ANDERSON, J., took no part in the consideration or decision of this case.
NOTES
[1]  Prior to commencing this action, McGowan applied for, received, and accepted workers' compensation benefits for the injuries she sustained as a result of being raped.
[2]  Minn.Stat. § 176.011, subd. 16 reads in relevant part:

"Personal injury" means injury arising out of and in the course of employment * * * but shall not include an injury caused by the act of a third person or fellow employee intended to injure the employee because of personal reasons, and not directed against the employee as an employee, or because of the employment.
[3]  At the time, staff members were coming and going from McGowan's office. Because she was feeling uneasy, McGowan eventually asked two male staff members to stay in the office with her.
[4]  Because of our decision, we need not address the issues raised by the court of appeals' denial of the church's petition for discretionary review.
