In December 1803, the good people of Hammersmith, a small town just outside of London, believed they were being terrorized by a ghost. After being spooked by a human-like figure, a wagon driver abandoned his horse and passengers and fled on foot; a pregnant woman also reported being physically attacked by the being as she walked by a churchyard. Something was harassing residents, that was for sure. Locals decided it was the ghost of a villager who had committed suicide the year before.

After weeks of these attacks, a group of men decided to take matters into their own hands. By this point, the mob was well aware that they were being menaced by a living, breathing prankster. The vigilante gang had some success right away: On December 29, one of the members of the watch spotted the figure and began a late-night chase. But unfortunately, the “ghost” shed its shroud in order to run faster—further proving that the threat the town was dealing with was, in fact, a real person.

On the evening of January 3, the group got even closer to ending the pranks. Francis Smith, one of the watchmen, spotted a white-clad “spirit” skulking around. He called out, but when the supposed specter failed to immediately identify itself, Smith fired his gun twice, killing the suspect.

Obviously, it wasn’t a ghost Smith killed—but it wasn’t the man pretending to be one, either. The fatality was 23-year-old Thomas Millwood, a man who happened to be wearing the wrong thing in the wrong place at the wrong time. Millwood was a plasterer (bricklayer), a profession that, at the time, called for a white apron and trousers. He had stopped by to visit his parents’ house after work and decided to head home when he heard the night’s watch call out. Millwood hadn’t ventured very far from the house when Smith’s bullet struck him, killing him almost instantly.

The real Hammersmith “ghost” confessed the following week. Shoemaker John Graham said he had concocted the scheme to frighten his apprentices, who had been scaring his children with ghost stories.

But the damage had been done, and Smith was very nearly sentenced to death for his actions. Though he was found guilty of murder, the customs officer received a pardon and ended up with a year of hard labor instead.

Though the case was resolved, it created a legal question that lingered long after the sentence was complete. At the time, there was no defense available for an action taken by someone who believed they were doing the right thing in the moment, but later discovered they had wrongly assessed the situation. This was rectified nearly two centuries later, when R v Williams was tried in the Court of Appeal in 1983. Judges handed down this decision:

In a case of self-defence, where self-defence or the prevention of crime is concerned, if the jury came to the conclusion that the defendant believed, or may have believed, that he was being attacked or that a crime was being committed, and that force was necessary to protect himself or to prevent the crime, then the prosecution have not proved their case. If however the defendant’s alleged belief was mistaken and if the mistake was an unreasonable one, that may be a peaceful reason for coming to the conclusion that the belief was not honestly held and should be rejected. Even if the jury come to the conclusion that the mistake was an unreasonable one, if the defendant may genuinely have been labouring under it, he is entitled to rely upon it.

Though there was no vengeful spirit roaming the streets of Hammersmith back in 1803, there may be one now. Local legend says that Thomas Millwood’s spirit returns every 50 years, appearing in the bar that now stands near where he was killed.