A man who had partied at Westcott’s home was plotting to rob him. An itinerant motorcycle mechanic, Westcott didn’t have much — two televisions and a handgun that once belonged to his brother were perhaps the most valuable possessions in his 600-square-foot house in Seminole Heights — but he was terrified by his would-be intruder’s threats to kill him.

Police tracked down the suspect and warned him to stay away. Westcott, those close to him said, was left with a word of advice from the investigating officers: If anyone breaks into this house, grab your gun and shoot to kill.

On the night of May 27, as armed men streamed through his front door, Westcott grabbed his gun. But the 29-year-old didn’t have a chance to shoot before he died in a volley of gunfire. And those who killed him weren’t robbers.

They were police officers from the same agency he had enlisted to protect his home.

In the span of a few months, Westcott had become the target of an intensive drug investigation. On that Tuesday in May — a night when he typically baby­sat his sister’s children at his house, according to his mother — he was fatally shot by a Tampa Police Department SWAT team executing a search warrant for marijuana.

Authorities told news reporters who swarmed to the scene that Westcott was dealing drugs and had sold pot multiple times, armed, to undercover Tampa police officers. During the raid, officials said, he “raised his gun and threatened the officers,” who killed him in self-defense.

A month later, newly disclosed information raises questions about the narcotics investigation that led police to Westcott’s door.