
636 F.3d 396 (2011)
Taci MATHERS, Individually and as, Next Friend for J.S.J., a minor, Appellant,
v.
Patricia WRIGHT, Appellee.
Taci Mathers, Appellee,
v.
Patricia Wright, Appellant.
Nos. 10-1241, 10-1242.
United States Court of Appeals, Eighth Circuit.
Submitted: November 17, 2010.
Filed: April 11, 2011.
*397 John Banning, argued, Springfield, MO, for appellant/cross-appellee.
James G. Thomeczek, argued, Robert Thomeczek, on the brief, St. Louis, MO, for appellee/cross-appellant.
Before WOLLMAN, HANSEN, and SHEPHERD, Circuit Judges.
WOLLMAN, Circuit Judge.
Taci Mathers, mother and next friend of J.S.J., sued Patricia Wright, J.S.J.'s fifth grade teacher. Mathers alleged that Wright had violated J.S.J.'s due process and equal protection rights, as well as rights protected under state law and the Individuals with Disabilities Education Act. Mathers also asserted a First Amendment claim on her own behalf, alleging that Wright continued to mistreat J.S.J. in retaliation for complaints Mathers lodged with school officials. The district court dismissed all but the equal protection claim. Mathers appeals. For the reasons outlined below, we dismiss her appeal for lack of jurisdiction. Wright cross appeals, contending that the district court erred in denying her qualified immunity. We affirm the denial of that claim.

I. Background
On appeal from dismissal under Federal Rule of Civil Procedure 12(b)(6), we accept as true the factual allegations contained in the complaint and draw all reasonable inferences in favor of the nonmoving party. Noble Sys. Corp. v. Alorica Central, LLC, 543 F.3d 978, 981 (8th Cir.2008); United States ex rel. Joshi v. St. Luke's Hosp., Inc., 441 F.3d 552, 555-56 (8th Cir.2006).
J.S.J. suffers from permanent or long-term impairments and is educationally disabled. In the fall of 2005, she was a student in Wright's fifth grade class. Mathers contends that Wright singled out J.S.J. for mistreatment because of her disability *398 and that this mistreatment continued throughout the school year. Count one of the complaint alleges that Wright deprived J.S.J. of her constitutional rights in violation of 42 U.S.C. § 1983. Specifically, Mathers alleges that Wright (1) refused to teach J.S.J., allowing her to play instead; (2) held J.S.J. back from recess and mandatory fire drills and assigned a classmate to watch her while the rest of the class took recess; and (3) forced J.S.J. to crawl on the floor. The district court interpreted count one to encompass two potential foundations for a viable § 1983 claim: substantive due process and a class-of-one equal protection claim. The second count of the complaint alleges that Wright continued to mistreat J.S.J. after Mathers complained to school officials and thereby violated Mathers's First Amendment right to free speech.
The district court dismissed the substantive due process claim, concluding that Mathers had failed to exhaust her administrative remedies as required under the Individuals with Disabilities Education Act, 20 U.S.C. § 1400. In the alternative, it held that the claim failed as a matter of law because the facts alleged neither implicated a fundamental right nor shocked the conscience. The district court also dismissed the First Amendment claim, concluding that the facts alleged were insufficient to establish Mathers's retaliation theory. The district court preserved the equal protection claim, however, after concluding that Mathers had made out a cognizable class-of-one claim that withstood Wright's challenge under Rules 12(b)(6) and 8(a)(2). Finally, the district court rejected Wright's contention that she was entitled to qualified immunity on all claims. Accordingly, following the district court's order, all but the equal protection claim had been dismissed.

II.
Mathers seeks to appeal from the dismissal of her substantive due process and First Amendment claims. We conclude that the appeal is not properly taken because the order in question dismissed some, but not all, of the claims alleged in the complaint and therefore is not final under 28 U.S.C. § 1291.
An order dismissing some but not all claims is not final and not immediately appealable. See, e.g., Reinholdson v. Minnesota, 346 F.3d 847 (8th Cir.2003). Such an order may be appealed, however, if certain conditions enumerated in Rule 54(b) or 28 U.S.C. § 1292(b) have been met. Rule 54(b) provides:
When an action presents more than one claim for reliefwhether as a claim, counterclaim, crossclaim, or third-party claim. . . the court may direct entry of a final judgment as to one or more, but fewer than all, claims . . . only if the court expressly determines that there is no just reason for delay.
Here, Mathers did not seek, much less obtain, a Rule 54(b) certificate that satisfies these conditions.
Nor did Mathers seek a certificate of appealability under 28 U.S.C. § 1292(b), another exception to the final judgment rule. Reinholdson, 346 F.3d at 849. Under 28 U.S.C. § 1292(b), we may assume jurisdiction over an appeal from an interlocutory order at our discretion if the district court issuing the order is of the opinion that "such order involves a controlling question of law as to which there is substantial ground for difference of opinion and that an immediate appeal from the order may materially advance the ultimate termination of the litigation[.]" Because the judgment was not final and Mathers failed to obtain a certificate under either *399 Rule 54(b) or 28 U.S.C. § 1292(b), we lack jurisdiction to hear her appeal.

III.
Wright cross appeals, contending that the district court erred in finding that she was not entitled to qualified immunity. Because a district court's denial of a motion to dismiss based on qualified immunity is immediately appealable, the cross appeal is properly before us. Schatz Family ex rel. Schatz v. Gierer, 346 F.3d 1157, 1159 (8th Cir.2003) (citing Behrens v. Pelletier, 516 U.S. 299, 307, 116 S.Ct. 834, 133 L.Ed.2d 773 (1996)).[1]
We review de novo the denial of a motion to dismiss, taking all allegations in the complaint as true. Crumpley-Patterson v. Trinity Lutheran Hosp., 388 F.3d 588, 590 (8th Cir.2004). To prevail at this stage, Wright must show that she is entitled to qualified immunity on the face of the complaint. Bradford v. Huckabee, 394 F.3d 1012, 1015 (8th Cir.2005). Qualified immunity is "an immunity from suit rather than a mere defense to liability" and "is effectively lost if a case is erroneously permitted to go to trial." Mitchell v. Forsyth, 472 U.S. 511, 526, 105 S.Ct. 2806, 86 L.Ed.2d 411 (1985). The inquiry is one of law, not fact, and is to be decided at the earliest possible stage of the litigation. Bridgewater v. Caples, 23 F.3d 1447, 1449 (8th Cir.1994) (citation omitted).
A state official sued in her individual capacity is entitled to qualified immunity so long as her conduct does not violate clearly established statutory or constitutional rights of which a reasonable person would have known. Harlow v. Fitzgerald, 457 U.S. 800, 102 S.Ct. 2727, 73 L.Ed.2d 396 (1982). A right is clearly established when "the contours of the right are sufficiently clear that a reasonable official would understand that what he is doing violates that right." Anderson v. Creighton, 483 U.S. 635, 640, 107 S.Ct. 3034, 97 L.Ed.2d 523 (1987).
In Heidemann v. Rother, we held that school officials who used a blanket as a binding restraint of a disabled student on the advice of a licensed school therapist did not violate the student's equal protection rights because the restraint technique was not "beyond the scope of professionally acceptable choices." 84 F.3d 1021, 1031 (8th Cir.1996). We noted that even if such conduct had violated the student's equal protection rights, the defendants would be entitled to qualified immunity unless a reasonable official would have recognized that the conduct constituted a violation. Id. at 1029. Accordingly, we consider (1) whether Wright's conduct went beyond the scope of professionally acceptable choices and thereby violated J.S.J.'s equal protection right; and (2) whether a reasonable teacher in Wright's position would understand that such conduct violates that right.
Mathers contends that she has alleged a violation of the Equal Protection Clause by stating a valid class-of-one claim. A class-of-one claim is stated when a plaintiff alleges that a defendant intentionally treated her differently from others who are similarly situated and that no rational basis existed for the difference in treatment. See Vill. of Willowbrook v. Olech, 528 U.S. 562, 120 S.Ct. 1073, 145 L.Ed.2d 1060 (2000); Costello v. Mitchell *400 Pub. Sch. Dist. 79, 266 F.3d 916 (8th Cir. 2001). More recently, in Engquist v. Oregon Department of Agriculture, 553 U.S. 591, 128 S.Ct. 2146, 170 L.Ed.2d 975 (2008), the Supreme Court delineated the outer limits of this cause of action when it concluded that class-of-one claims are not cognizable in the context of public employment. It reasoned that this categorical exclusion was appropriate in light of the nature of employment decisions:
There are some forms of state action, however, which by their nature involve discretionary decisionmaking based on a vast array of subjective, individualized assessments. In such cases the rule that people should be "treated alike, under like circumstances and conditions" is not violated when one person is treated differently from others, because treating like individuals differently is an accepted consequence of the discretion granted. In such situations, allowing a challenge based on the arbitrary singling out of a particular person would undermine the very discretion that such state officials are entrusted to exercise.
Id. at 603, 128 S.Ct. 2146. We are mindful that many decisions in education, like those in the employment context, may well be based on subjective factors. Engquist underscores the importance of context in determining whether the alleged intentional disparate treatment is actionable or rather a permissible exercise of discretion. Thus, it is within the context of the classroom setting of this case that we review Mathers's allegations that, on account of Wright's irrational and arbitrary animus toward J.S.J., she intentionally treated J.S.J. differently from other students in Wright's classroom. Wright contends that this allegation is insufficient as a matter of law because Mathers must allege disparate treatment as between J.S.J. and other disabled students.
Wright's theory would have some force had Mathers's allegations been somehow specific to disabled students and exclusive of the general student population. See, e.g., Scruggs v. Meriden Bd. of Educ., 2006 WL 2715388 (D.Conn. Sept. 22, 2006) (concluding that plaintiff had failed to allege that her learning disabled son had been treated differently from other learning disabled students who were also harassed by classmates and had therefore failed to establish an equal protection violation). But Mathers is not making that type of claim. She alleges that Wright singled out J.S.J. from other students in her class. These students are similarly situated by virtue of being taught by Wright in the same classroom. It is J.S.J.'s experience as a student as such, and not her status as a disabled student, that defines the ground of comparison on which her equal protection claim rests. J.S.J.'s disability is significant only in that it allegedly triggered the disparate treatment. Accordingly, the record does not support Wright's contention that Mathers failed to identify a class of similarly situated individuals.
By refusing to teach J.S.J., isolating her during recess and fire drills, and making her crawl on the floor, Wright treated J.S.J. differently from other students in her classroom. On the face of the complaint, we discern no rational basis for this disparate treatment, nor can we infer that Wright suffered a lapse of professional judgment. See Bridgewater, 23 F.3d at 1449 (noting that "the qualified immunity standard gives ample room for mistaken judgments by protecting all but the plainly incompetent or those who knowingly violate the law") (citation omitted). Indeed, Mathers claims the opposite: that the mistreatment did not arise from educational or safety concerns, but from personal animus against J.S.J. because *401 she was disabled. Thus, Wright's conduct exceeded the scope of professionally acceptable choices and was not discretionary. See Hanes v. Zurick, 578 F.3d 491, 496 (7th Cir.2009) (denying qualified immunity to police officers sued under a class-of-one theory and concluding that "[t]he officer motivated by malice alone is not exercising discretion and is not weighing the factors relevant to the officer's duties to the public"). These factors all support the conclusion that, under the facts alleged, a constitutional violation of J.S.J.'s equal protection rights occurred.
Wright complains that the district court erred in emphasizing her subjective intent in its qualified immunity analysis, particularly with respect to its finding of malice. The subjective intent of the actor is generally irrelevant to the objective reasonableness test at the heart of the qualified immunity analysis. Harlow, 457 U.S. at 800, 102 S.Ct. 2727. Here, however, the actor's subjective intent is relevant to determine whether the mistreatment was intentional, as required to state a cognizable class-of-one claim. See El-Crawford v. Britton, 523 U.S. 574, 588-89, 118 S.Ct. 1584, 140 L.Ed.2d 759 (1998) (recognizing that evidence of malice or improper motive, while generally irrelevant to the reasonableness prong of qualified immunity analysis, may be necessary to establish that a constitutional violation occurred when it is an element of the constitutional claim). To the extent that the district court considered Wright's subjective intent, it did so in determining whether a constitutional violation occurred, not whether the right at issue was clearly established. Accordingly, Wright's objection that the district court improperly emphasized subjective intent fails.
Moreover, the district court's repeated references to malice are understandable when considered in the context in which they were made. The Supreme Court first recognized the class-of-one claim in Olech in 2000. Other circuits have interpreted Olech to require malice or animus as an element of a viable class-of-one equal protection claim.[2] Although we have not heretofore held that malice is an element of a class-of-one claim, see Costello, 266 F.3d at 916, we conclude that the district court did not err in considering the existence of malice on Wright's part. To the contrary, the court's finding that Wright's conduct was malicious supports its rationale for concluding that Mathers had pleaded her class-of-one claim with sufficient detail to withstand Wright's 12(b)(6) and 8(a)(2) motion.
We next consider whether the equal protection right at issue was clearly established. For a right to be clearly established, "[t]here is no requirement that the very action in question has previously been held unlawful," Vaughn v. Ruoff, 253 F.3d 1124, 1129 (8th Cir.2001) (quotation omitted), nor that there be "a case decided on all fours with the present factual circumstances." *402 Wilson v. Lawrence Cnty., 260 F.3d 946, 951 (8th Cir.2001). Rather, we need conclude only that, in light of preexisting law, the unlawfulness of the conduct at issue was apparent. Anderson, 483 U.S. at 640, 107 S.Ct. 3034.
As pointed out in Engquist, the Equal Protection Clause has long prohibited arbitrary classifications. 553 U.S. at 598, 128 S.Ct. 2146 (describing the core concern of the Equal Protection Clause as providing a "shield against arbitrary classifications"); Olech, 528 U.S. at 564, 120 S.Ct. 1073 (stating that the purpose of equal protection "`is to secure every person within the State's jurisdiction against intentional and arbitrary discrimination....'") (quoting Sioux City Bridge Co. v. Dakota Cnty., 260 U.S. 441, 43 S.Ct. 190, 67 L.Ed. 340 (1923)). Likewise, "it is well established that `the Equal Protection Clause protect[s] persons, not groups.'" Engquist, 553 U.S. at 598, 128 S.Ct. 2146 (quoting Adarand Constructors, Inc. v. Pena, 515 U.S. 200, 227, 115 S.Ct. 2097, 132 L.Ed.2d 158 (1995)). In light of those well-established principles, we see no reason why the prohibition of intentional, arbitrary discrimination would be any less clear in the class-of-one context than in traditional equal protection analysis.
Thus, we conclude that it was clearly established that a school official may not treat a student differently from her similarly situated peers when such conduct exceeds the scope of professionally acceptable choices and stems from an improper personal motivation. This holding is consistent with decisions from other courts that have denied qualified immunity to a school official accused of discriminating against a student in the absence of a rational basis to do so. See, e.g., Nabozny v. Podlesny, 92 F.3d 446 (7th Cir.1996) (holding that reasonable officials would have known that discrimination against student based on his sexual orientation was unlawful); see also Weidow v. Scranton Sch. Dist., 2009 WL 2588856 (M.D.Pa. Aug. 19, 2009) (unpublished) (denying defendant's motion to dismiss a class-of-one claim in which a disabled student alleged that the school did not send her transcripts to colleges to which she had applied, as it did for all other students in her graduating class, and that it required her to notice her home-schooled status on her applications when it required no other home-schooled students to do so).
Our holding is narrow. Looking no further than the face of the complaint and accepting as true all allegations therein, we conclude that the allegations regarding Wright's treatment of J.S.J. state an equal protection violation, and we are satisfied that a reasonable teacher in Wright's position would recognize as much. Accordingly, Wright is not entitled to qualified immunity at this stage of the proceeding.

IV.
Mathers's appeal is dismissed for want of jurisdiction. The order denying qualified immunity is affirmed.
NOTES
[1]  After both parties had submitted briefs pursuant to this appeal but before we heard oral argument, Mathers filed a motion to dismiss Wright's appeal or to strike her brief on the grounds that Wright had failed to comply with Rule 28 of the Federal Rules of Appellate Procedure. In essence, Mathers asked that we sanction Wright for her alleged failure to cite to the record in support of her arguments on appeal. We find no merit to this motion, and thus we deny it.
[2]  In Olech, Justice Breyer's concurrence took the position that the class-of-one claim was valid because it alleged an "extra factor" that the official took "vindictive action" or acted with "illegitimate animus" against the claimant. Id. at 566, 120 S.Ct. 1073. Other circuits have adopted Justice Breyer's position in requiring animus or vindictiveness, rather than mere arbitrariness, as an element of a valid class-of-one claim. See Jennings v. City of Stillwater, 383 F.3d 1199, 1211 (10th Cir.2004) (noting that the Second, Seventh, Tenth, and Eleventh Circuits have done so); but see Bell v. Duperrault, 367 F.3d 703, 711-13 (7th Cir.2004) (Posner, J., concurring) (observing that the case law among the circuits following Olech is equivocal on whether malice is an essential element and pointing out that "personal ill will is not the essential criterion of a meritorious class-of-one suit" and that "[i]t is enough if the plaintiff can prove that the defendant is treating similarly situated people differently for improper (normally personal) reasons").
