Defendant Officer Brad Knoblauch appeals the district court’s denial of his motion for summary judgment. For the following reasons, we reverse.
I
On April 29, 2000, Officer Brad Knoblauch (“Knoblauch”) of the Holly Springs Police Department was on a routine late-night/early-morning patrol when he observed Roy Pasco (“Pasco”) driving erratically. Believing Pasco was intoxicated, Knoblauch followed him. When Pasco failed to observe a stop sign, Knoblauch activated his lights and siren and Pasco pulled over to the side of the road. As Knoblauch exited his patrol car to approach Pasco’s vehicle, Pasco sped off. Knoblauch returned to his car and began to chase Pasco. The pursuit took place on a rural, curvy two-lane road at speeds in excess of ninety miles per hour. One minute into the chase, Knoblauch’s supervisor radioed an order for Knoblauch to terminate the chase.
Pasco argues that Knoblauch did not back off of the chase and instead bumped Pasco’s car from behind, sending it off the road into a ravine. Pasco died from the injuries he suffered in the crash. For the purposes of summary judgment and this *575appeal, Knoblauch has conceded Pasco’s version of events.
This case has a complicated procedural history, and the instant appeal is our third consideration of this set of facts. Plaintiffs, Pasco’s surviving family, originally sued the city of Holly Springs under 42 U.S.C. § 1983 for violations of the Fourth and Fourteenth Amendments (Pasco P). This suit did not name Knoblauch as a defendant. The district court granted summary judgment in favor of the city on the grounds that no basis for municipal liability existed and that Pasco had failed to establish a Fourth Amendment claim. On appeal we affirmed the summary judgment because no municipal liability existed, but we did not reach the Fourth Amendment question. Pasco v. Holly Springs, 101 Fed.Appx. 6 (5th Cir.2004) (unpublished). While Pasco I was pending before us, the Plaintiffs brought suit against Knoblauch individually (Pasco //)• The district court found that Pasco II raised no new facts or arguments beyond those in Pasco I and granted Knoblauch’s motion for summary judgment because Pasco had failed to establish a Fourth Amendment claim. On appeal in Pasco II we reversed the summary judgment, holding that questions of fact existed as to whether Knoblauch intentionally bumped Pasco’s car, and remanded. Pasco v. Knoblauch, 223 Fed.Appx. 319 (5th Cir. 2007) (unpublished).
Seven weeks after our decision in Pasco II the Supreme Court decided Scott v. Harris, 550 U.S. 372, 127 S.Ct. 1769, 167 L.Ed.2d 686 (2007), which established a rule for § 1983 actions against police officers involved in high-speed chases. In light of Scott, Knoblauch moved for summary judgment based on qualified immunity. This was the first time he raised this defense. Pasco moved to strike the affirmative defense as waived. The district court denied summary judgment based on its findings that Knoblauch had waived his qualified immunity defense by failing to raise it in a timely fashion, and that Knoblauch violated clearly established Fourth Amendment law when he ended the chase by bumping Pasco from the road. The district court also granted Pasco’s motion to strike. Knoblauch appeals the denial of summary judgment.
II
We review the district court’s denial of summary judgment predicated on qualified immunity de novo. Haggerty v. Tex. S. Univ., 391 F.3d 653, 655 (5th Cir.2004). In an interlocutory appeal in which the defendant asserts qualified immunity, if the district court found that factual disputes exist we accept the plaintiffs version of the facts as true to the extent supported by the summary judgment record. Id.
Knoblauch appeals the district court’s order denying his motion for summary judgment based on qualified immunity. In this order, as well as in the memorandum opinion explaining the reasons for the denial, the district court also granted Pasco’s motion to strike the affirmative defense as waived. Despite this somewhat confusing posture, it is clear that the district court denied summary judgment because it found Knoblauch had waived the defense, and also because it concluded that qualified immunity would not protect Knoblauch from suit since he violated clearly established Fourth Amendment law. Importantly, the district court based both determinations on conclusions of law. Therefore, we will review the waiver issue and the Fourth Amendment issue de novo since both form the basis for the denial of summary judgment. See, e.g., Murray v. Crossmark Sales, Inc., 163 Fed.Appx. 339, 341-42 (5th Cir.2006) (unpublished) (reviewing de novo the district court’s sum*576mary judgment conclusion that an affirmative defense was not waived under Fed. R. Civ. P. 8(c)); Eddy v. Virgin Islands Water and Power Auth., 256 F.3d 204, 208-09 (3d Cir.2001) (reviewing de novo the district court’s summary judgment conclusion that qualified immunity was waived because it was not raised in the first responsive pleading, and observing that “[i]f we have jurisdiction to review an order rejecting qualified immunity at the summary judgment stage, our review of the order is plenary”).
Ill
A
We first consider our jurisdiction to hear this interlocutory appeal. Generally, denials of summary judgment are not final orders. See Mendenhall v. Riser, 213 F.3d 226, 229 (5th Cir.2000). However, the denial of qualified immunity on summary judgment is immediately appealable under the collateral order doctrine if based on an issue of law. Mitchell v. Forsyth, 472 U.S. 511, 530, 105 S.Ct. 2806, 86 L.Ed.2d 411 (1985); Mendenhall, 213 F.3d at 229-30. In other words, a denial of summary judgment based on qualified immunity is deemed a final decision under 28 U.S.C. § 1291, and thus our jurisdiction is proper, “to the extent that the question on appeal is whether the undisputed facts amount to a violation of clearly established law.” Haggerty, 391 F.3d at 655. If the district court found that genuine factual disputes exist, we must accept the plaintiffs version of the facts as true to the extent supported by the summary judgment record. Id. The Supreme Court has recognized the importance of interlocutory review of orders denying a qualified immunity defense because these orders are effectively unreviewable, since “review after trial would come too late to vindicate one important purpose of qualified immunity — namely, protecting public officials, not simply from liability, but also from standing trial.” Johnson v. Jones, 515 U.S. 304, 312, 115 S.Ct. 2151, 132 L.Ed.2d 238 (1995) (internal quotation omitted).
Pasco argues that we lack jurisdiction to hear this appeal because there are material facts in dispute. However, the district court did not base its denial of summary judgment on the existence of material factual disputes.1 On the contrary, at the outset of its analysis the district court explicitly adopted Pasco’s version of the facts and Knoblauch has conceded Pasco’s version of the events for purposes of summary judgment.2 The district court engaged in a legal analysis of Fourth Amendment case law to reach its conclusion that it was clearly established in 2000 that Knoblauch’s conduct was unlaw*577fill. It is clear from the district court’s order that the denial of summary judgment was based on legal conclusions regarding Fourth Amendment reasonableness, applied to the facts as Pasco alleged them. Where the district court relies on one party’s version of the facts to make a ruling of law denying summary judgment based on qualified immunity, our jurisdiction is proper.3 See Haggerty, 391 F.3d at 655.
B
We now address whether the district court properly held that Knoblauch waived his defense of qualified immunity by failing to raise the defense until the motion for summary judgment. This is an issue of law over which we have jurisdiction under the collateral order doctrine. See Eddy, 256 F.3d at 209 (finding that the collateral order doctrine permitted review of the district court’s determination that qualified immunity was waived as untimely under Rule 8(c)). We conclude that the district court applied the incorrect legal standard for deciding whether an affirmative defense was waived.
As an affirmative defense, qualified immunity must be pled and proved by the defendant. See Gomez v. Toledo, 446 U.S. 635, 640, 100 S.Ct. 1920, 64 L.Ed.2d 572 (1980); Fed. R. Civ. P. 8(e). Generally, under Rule 8(c) affirmative defenses must be raised in the first responsive pleading. However, “[w]here the matter is raised in the trial court in a manner that does not result in unfair surprise ... technical failure to comply precisely with Rule 8(c) is not fatal.” Allied Chem. Corp. v. Mackay, 695 F.2d 854, 855-56 (5th Cir.1983). An affirmative defense is not waived if the defendant “raised the issue at a pragmatically sufficient time, and [the plaintiff] was not prejudiced in its ability to respond.” Id. at 856. We have noted that a failure to plead an affirmative defense in the first response is “especially excusable” where the law on the topic is not clearly settled. See Johnson v. Johnson, 385 F.3d 503, 516 n. 7 (5th Cir.2004).
Despite referencing the above law, the district court found waiver based solely on the fact that a fifty-two month delay existed between Knoblauch’s first responsive pleading and his assertion of qualified immunity. The district court concluded that Pasco was presumptively prejudiced by this delay, without any analysis or description of the prejudice. However, under Rule 8(c) we do not take a formalistic approach to determine whether an affirmative defense was waived. Rather, we look at the overall context of the litigation and have found no waiver where no evidence of prejudice exists and sufficient time to respond to the defense remains before trial. See Giles v. Gen. Elec. Co., 245 F.3d 474, 492 (5th Cir.2001) (finding no waiver where a new affirmative defense was raised in a joint pretrial order over a year after complaint was filed); Lubke v. City of Arlington, 455 F.3d 489, 499 (5th Cir.2006) (finding no waiver where a defense was raised in a pretrial motion in limine two years after the complaint was filed and just weeks before trial); Allianz Versicherungs, AG v. Profreight Brokers, Inc., 99 Fed.Appx. 10, 12 (5th Cir.2004) (unpublished) (finding no waiver because “[t]he fact that [the plaintiff] had three months to consider and prepare for the limitations defense ... refutes [the] assertion that it was prejudicially surprised .... ”). This is consistent with the Supreme Court’s inter*578pretation of the purpose of Rule 8(c), which is to give the opposing party notice of the affirmative defense and a chance to argue why it should not apply. See Blonder-Tongue Lab. v. Univ. of Ill. Found., 402 U.S. 313, 350, 91 S.Ct. 1434, 28 L.Ed.2d 788 (1971).
Here, though Knoblauch raised qualified immunity fifty-two months after the complaint was filed, substantial time remained before trial for Pasco to respond to the defense. Knoblauch asserted qualified immunity two months before discovery was due and six months before the pretrial conference. Pasco submitted a full response to the defense to the district court and has briefed it on appeal to this court. No evidence indicates that Pasco was prejudiced by the late assertion or that Knoblauch intentionally delayed raising the defense to prejudice Pasco. On the contrary, the record indicates the delay resulted from the lengthy procedural history of this case (including numerous stays, which totaled twenty-nine months while the first two appeals were pending), combined with significant developments following the appeal in Pasco II. One such development occurred when Pasco abandoned the claim, on appeal in Pasco II, that Roy Pasco died from blunt trauma injuries inflicted by the police after he walked away from the crash.4 Further, a major legal development occurred when the Supreme Court handed down Scott v. Hams in April 2007, a month after we remanded Pasco II. Scott addressed, for the first time, the Fourth Amendment implications of a police officer ending a high-speed car chase by ramming the fleeing suspect’s vehicle off the road. See generally Scott, 550 U.S. 372, 127 S.Ct. 1769, 167 L.Ed.2d 686. As we noted in Johnson, a delay in raising an affirmative defense is particularly excusable where, as here, the law was not clearly settled prior to Scott. See Johnson, 385 F.3d at 516 n. 7.
We accordingly hold that the lack of prejudice to Pasco combined with the unusual circumstances and history of this litigation indicate that Knoblauch did not waive qualified immunity.
C
We now turn to the question of whether qualified immunity protects Knoblauch from suit based on the facts as Pasco alleged them. Qualified immunity shields government officials from civil damages liability “insofar as their 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, 818, 102 S.Ct. 2727, 73 L.Ed.2d 396 (1982). More precisely, “[t]he contours of the right must be sufficiently clear that a reasonable official would understand that what he is doing violates that right ... in the light of preexisting law the unlawfulness must be apparent.” Anderson v. Creighton, 483 U.S. 635, 640, 107 S.Ct. 3034, 97 L.Ed.2d 523 (1987). As we have held, “pre-existing law must dictate, that is, truly compel (not just suggest or allow or raise a question about), the conclusion for every like-situated, rea*579sonable government agent that what defendant is doing violates federal law in the circumstances.” See Pierce v. Smith, 117 F.3d 866, 882 (5th Cir.1997) (emphasis in original) (internal quotation and citation omitted).
Until recently, we resolved government officials’ qualified immunity claims under the strict two-part test mandated by the Supreme Court in Saucier v. Katz, deciding (1) whether facts alleged ór shown by plaintiff make out the violation of a constitutional right, and (2) if so, whether that right was clearly established at the time of the defendant’s alleged misconduct. See Saucier, 533 U.S. 194, 201, 121 S.Ct. 2151, 150 L.Ed.2d 272 (2001); Sorenson v. Ferrie, 134 F.3d 325, 328 (5th Cir.1998). However, the Supreme Court has revisited this rule and determined that the rigid two-step structure is no longer mandatory. See Pearson v. Callahan, — U.S. —, 129 S.Ct. 808, 818, 172 L.Ed.2d 565 (2009). Accordingly, as the Court did in Pearson, we will first consider whether the officer’s conduct violated clearly established law. Id. at 822. If we determine that the answer is no, qualified immunity will shield Knoblauch from suit.
The following undisputed facts are relevant to this question. Knoblauch and Pas-co were engaged in a high-speed chase in excess of ninety miles per hour and were approaching the edge of the city. The chase occurred on a curvy two-lane road in-a residential area at approximately 3:00 in the morning. Pasco was having trouble negotiating sharp curves in the road at the high rate of speed. Knoblauch testified that he observed Pasco drinking from a beverage container and suspected he was driving while intoxicated. As Pasco claims, and Knoblauch concedes, no other vehicles, pedestrians, or other bystanders were encountered . during the pursuit. Knoblauch also concedes that Pasco might have decelerated at the very end of the chase, though Pasco’s accident reconstructionist was unable to determine the exact speed of Pasco’s vehicle when the collision occurred.
The district court concluded that Knoblauch’s conduct violated clear Fourth Amendment law because Knoblauch “was acting contrary to police department protocol”'when he bumped Pasco off the road. However; the fact that Knoblauch acted contrary to his supervisor’s order is constitutionally irrelevant. Violations of non-federal laws cannot form a basis for liability under § 1983, and qualified immunity is not lost because an officer violates department protocol. See, e.g., Collins v. City of Harker Heights, 503 U.S. 115, 119, 112 S.Ct. 1061, 117 L.Ed.2d 261 (1992) (finding that § 1983 does not provide a remedy if there is no violation of federal law); Davis v. Scherer, 468 U.S. 183, 194, 104 S.Ct. 3012, 82 L.Ed.2d 139 (1984) (noting that officials do not lose qualified immunity where they violate administrative directives); Scott, 127 S.Ct. at 1773 n. 1 (observing that “it is irrelevant to our analysis whether [Officer] Scott had permission to take the precise actions he took” when he bumped the fleeing suspect off the road). Therefore, we hold that the district court erred in concluding that Knoblauch loses qualified immunity because he failed to follow his supervisor’s order to end the chase.
The district court also found that Tennessee v. Garner, 471 U.S. 1, 105 S.Ct. 1694, 85 L.Ed.2d 1 (1985), established a clear Fourth Amendment rule making Knoblauch’s actions unconstitutional because no innocent bystanders were present. Gamer involved an application of the Fourth Amendment’s reasonableness test to the use of deadly force when a “young, slight, and unarmed” burglary suspect flees on foot. Id. at 21, 105 S.Ct. 1694. *580The Court held that it was unreasonable for an officer to shoot such a suspect in the back of the head when the officer could not have believed the suspect posed any threat and did not attempt to justify his actions on any basis other than the need to prevent escape. See id. at 4, 21. Clearly, Garner did not create a rigid rule for all situations involving deadly force; it would be unreasonable to expect a police officer to make the numerous legal conclusions necessary to apply Gamer to a high-speed car chase. Considering the vast difference between an unarmed suspect fleeing on foot and a reckless, intoxicated driver speeding away from police in a vehicle, we hold that Gamer did not establish a clear Fourth Amendment rule making Knoblauch’s conduct unlawful based on the summary judgment record in this case.
In 2000 neither the Supreme Court nor the Fifth Circuit had spoken directly to the question of whether an officer may attempt to end a high-speed car chase by bumping the suspect off of the road. However, in 2007 the Supreme Court confronted facts similar to this case in Scott v. Harris. In Scott, a police officer rammed a fleeing suspect’s rear bumper to end a car chase that had exceeded eighty-five miles per hour and presented a danger to the public. See Scott, 127 S.Ct. at 1772. The Court held:
A police officer’s attempt to terminate a dangerous high-speed car chase that threatens the lives of innocent bystanders does not violate the Fourth Amendment, even when it places the fleeing motorist at risk of serious injury or death.
Id. at 1779. Although this rule does not directly apply to the question of what clearly established law existed in 2000, it does give us insight into the state of the law prior to 2007 regarding a police officer ending a car chase by bumping the suspect off the road. In reaching the conclusion in Scott, the Court did not cite to any existing cases dealing with this factual situation. The Court did, however, determine that Gamer could not establish a clear Fourth Amendment rule governing car chases because that case involved a suspect fleeing on foot. Id. at 1777. Scott therefore reaffirms our conclusion that Gamer did not clearly establish a rule making Knoblauch’s conduct unlawful.
In the absence of a specific rule governing the constitutionality of Knoblauch’s actions, our inquiry turns on whether Knoblauch’s actions were objectively reasonable. See Graham v. Connor, 490 U.S. 386, 388, 109 S.Ct. 1865, 104 L.Ed.2d 443 (1989) (finding that a claim of “excessive force in the course of making [a] ... ‘seizure’ of [the] person ... [is] properly analyzed under the Fourth Amendment’s ‘objective reasonableness’ standard”). This reasonableness is determined by a balancing test between “the nature and quality of the intrusion on the individual’s Fourth Amendment interests against the importance of the governmental interests alleged to justify the intrusion.” United States v. Place, 462 U.S. 696, 703, 103 S.Ct. 2637, 77 L.Ed.2d 110 (1983).
The Court’s analysis of the reasonableness of the officer’s actions in Scott is instructive. Though the specific facts of every car chase will be different, the Court acknowledged the generally inherent danger that suspects fleeing from police in vehicles pose to the public — even when no bystanders or other motorists are immediately present. At the moment the officer in Scott rammed the suspect’s vehicle, it was not threatening any other vehicles or pedestrians. See Scott, 127 S.Ct. at 1776 n. 7. In spite of this fact, the Court concluded that the suspect “posed an actual and imminent threat to the lives of any *581pedestrians who might have been present, to other civilian motorists, and to the officers involved in the chase.” Id. at 1778. This indicates that the holding of Scott was not dependent on .the actual existence of bystanders — rather,, the Court was also concerned about the safety of those who could have been harmed if the chase continued.
Importantly, the Court observed that the balancing test judging the reasonableness of the officer’s conduct must consider not only the number of Uves potentially at risk, but also the relative culpability of those threatened. Id. The Court acknowledged that risks were present whether the officer ended the chase or allowed the suspect to flee unabated; however, the fleeing suspect had intentionally placed himself and the public in danger, while any bystanders who could be injured by the fleeing suspect had done nothing to create the dangerous situation. Id. Therefore, though the officer was stuck between “two evils” in either possibly harming the fleeing suspect or possibly allowing innocent parties to be injured, it was reasonable for the officer to choose to end the chase in light of the relative culpability of those at risk. Id.
Here, Pasco was fortunate enough not to have encountered any pedestrians or other motorists during his high-speed and reckless attempt to evade Knoblauch. We will never know whether Pasco would have harmed someone if Knoblauch .had not ended the chase, but the undisputed facts indicate that Pasco would have posed a serious threat to anyone he encountered. Pasco was driving recklessly, at ninety miles per hour down a curvy two-lane road. Knoblauch suspected that he might be driving under the influence of alcohol.5 Knoblauch had no way of knowing if another vehicle would enter Pasco’s path or whether a person might have been walking around the next corner. He made a quick decision, under stressful circumstances, to try to end the serious danger Pasco posed before any of these potentially tragic situations occurred.
The early morning hours,-the rural nature of the area, and the fact that Pasco may have slowed down immediately before impact do not render Knoblauch’s actions unreasonable. Like in Scott, it was Pasco himself who created this dangerous situation and put himself at risk when he fled from the officers. As indicated by the undisputed facts of the chase, it was reasonable for Knoblauch to believe that Pas-co would continue to pose a danger to anyone he might encounter. Stuck between the choice of letting a presumptively intoxicated and reckless driver continue unabated or bumping the suspect off the road, Knoblauch chose the course of action that would potentially save the lives of individuals who had no part in creating the danger. Although this choice ended tragically with Pasco’s death, the balancing test indicates that Knoblauch’s "actions were reasonable.
Qualified immunity protects “all but the plainly incompetent or those who knowingly violate the law.” Malley v. Briggs, 475 U.S. 335, 341, 106 S.Ct. 1092, 89 L.Ed.2d 271 (1986). The immunity inquiry is intended to reflect the understanding that “reasonable mistakes can be made as to the legal constraints on particular police conduct.” Saucier, 533 U.S. at 205, *582121 S.Ct. 2151. Importantly, qualified immunity purposefully shields police officers’ split-second decisions made without clear guidance from legal rulings: “Qualified immunity operates ... to protect officers from the sometimes hazy border between excessive and acceptable force, and to ensure that before they are subjected to suit, officers are on notice their conduct is unlawful.” Id. at 205-06, 121 S.Ct. 2151 (internal quotation and citation omitted). We find that Knoblauch’s actions in terminating the serious threat posed by an intoxicated suspect fleeing down a narrow, curvy highway at excessive rates of speed did not violate clearly established law, and were reasonable under the circumstances. Accordingly, qualified immunity protects Knoblauch .from suit.
IV
For the foregoing reasons, we REVERSE the district court’s denial of Knoblauch’s motion for summary judgment.
. Pasco claims that we lack jurisdiction because the district court stated at the conclusion of its order that there are "genuine factual disputes here.” However, the district court did not describe the factual disputes and did not discuss whether the disputes related to facts material to summary judgment issues. Rather, we read this statement to refer to what Knoblauch would likely argue at trial— that he followed his supervisor’s order to end the chase. The dispute over whether Knoblauch followed his supervisor’s order is irrelevant to the summary judgment inquiry, because Knoblauch has conceded that the events took place as Pasco describes them.
. Knoblauch has repeatedly stated that he concedes to every "factual dispute” identified by Pasco that finds some evidentiary support in the record, including the possibility indicated by Pasco’s accident reconstructionist that Pasco "left the road at a speed slow enough to track down the embankment.” Importantly, none of the alleged factual disputes Pasco identifies are mentioned by the district court in its memorandum opinion, which relies exclusively on determinations of law.
. Accordingly, with this ruling we also deny Pasco's outstanding Motion to Dismiss Appeal ior lack of jurisdiction.
. Throughout Pasco I and until the appeal in Pasco II, Pasco pursued the theory that Knoblauch bumped him off the road and then violated his right to be free from excessive force by beating him to death after he walked away from the accident. Responding to Knoblauch's first motion for summary judgment, Pasco asserted “[tjhere is strong circumstantial evidence that Pasco walked away from the wreck and died of injuries inflicted by the police.” Knoblauch argued that he did not assert qualified immunity against the beating claim because he believed it would be a frivolous defense to the charge that he beat Pasco to death, but that he raised the defense as soon as was practicable after our remand and the Scott decision, when the theory of liability was limited to the bumping claim.
. Knoblauch testified that he witnessed Pasco driving while drinking from what he believed to be a container of beer. Though at the time Knoblauch could not know for certain whether Pasco was driving under the influence, tests later confirmed that Pasco’s blood alcohol content was above the legal limit and cocaine was present in his system during the chase.