Updated

A K-9 officer in Mississippi died this week after suffering a heat stroke inside a deputy’s car, officials said.

The dog, a 6-year-old Belgian Malinois named Dex, was left inside Hinds County Deputy Lafayette Martin’s car while he ate lunch at a nearby restaurant.

MINNESOTA CORRECTIONS OFFICER ATTACKED, KILLED BY INMATE, OFFICIALS SAY

Martin left his 2016 Chevy Tahoe running so the K-9 would stay cool, but the engine shut down at some point while the deputy was in the restaurant, the sheriff’s department said, according to Mississippi News Now.

Dex — a top drug detection K-9 with the sheriff’s department — died within the hour, the news station reported.

Hinds County Sheriff’s Department Major Pete said the deputy was “devastated."

OFFICERS KILLED IN THE LINE OF DUTY IN 2018

The sheriff's department, which has sent the Tahoe to be repaired, plans to install “hot car alarms” to prevent a similar incident from happening in the future.

The device sounds an alarm and automatically lowers the car’s windows if the inside of a vehicle reaches a certain temperature, Mississippi News Now reported.