The fatal confrontation, captured on Westlake’s dash camera, was what the Polk County sheriff called a “classic ‘stand your ground’ case,” referring to the controversial Florida law that grants immunity to people acting in self-defense.

“This is a justifiable homicide all day long. You have the right protect yourself,” Sheriff Grady Judd said Wednesday. “This was the intent of the law.”

Boek, 34, didn’t actually have a firearm when he left his truck — he was holding a cell phone, authorities said.

And Westlake, 38, was no ordinary Uber driver.He’s a licensed armed security guard who holds a concealed weapons permit and who had just completed training to be a police officer.

Neither Westlake nor Boek’s family members could be reached Wednesday for comment.

The sheriff’s office said Westlake is cooperating with the investigation. And the sheriff wanted this much to be clear: “Here’s a message for the hotheads of the community: Don’t do that stuff,” Judd said. “Good people carry guns and they will shoot you. A lot. Graveyard dead.”

‘He’s stalking his girlfriend’

The shooting is the latest high-profile “stand your ground” case to spark controversy. The list includes the fatal shooting of 17-year-old Trayvon Martin in 2012 by neighborhood watch volunteer George Zimmerman, and Michael Drejka’s fatal shooting of Markeis McGlockton in July in a convenience store parking lot.

Zimmerman was acquitted in Martin’s death after claiming self-defense, rather than leaning on the “stand your ground” law. Drejka was initially let go but has since been charged with manslaughter.

Tuesday’s incident started with a case of mistaken identity.

At a bar in Dundee, Florida, early Tuesday morning, Boek’s girlfriend called an Uber for another woman who’d had too much to drink, and she helped her get into the vehicle, police said.

Boek saw her and assumed his girlfriend had gotten into the Uber, though she’d actually gone back into the bar, the sheriff said.

Some time later, Boek and his girlfriend got into a heated text message exchange.

“The boyfriend is explosive,” Judd, the sheriff, said. “He’s stalking his girlfriend. He’s angry with her, and he tells her, ‘I’m going to eff up the Uber driver.'”

Then, Boek drove after the Uber in his truck, Judd said.

Boek “tailgates him a minute, then he pulls out beside him, rides besides him a couple of seconds … and then starts to pass him and forces him to a stop in the roadway,” Judd said.

About six seconds after Boek jumped out of his pick-up truck, Westlake shot him, according to the dash-cam video released by police.

“Oh my God,” Westlake can be heard saying.

‘He came towards me’

Westlake then dialed 911 and tried to save Boek, the Polk County Sheriff’s Office said.