An off-duty Kentucky police officer was fatally shot Thursday, leading to an hours-long manhunt and the death of the suspected gunman, authorities said.

The first encounter took place around 5:10 p.m. in Hopkinsville, Ky., when a man pulled over Phillip Meacham, an officer with the Hopkinsville Police Department who was off duty at the time.

The male suspect opened fire on Meacham for unknown reasons, police said. According to local news reports, the suspect was dressed as a police officer and pretending to be in law enforcement.

Hopkinsville police have not responded to attempts to confirm that detail.

Meacham, 38, was treated for his injuries at a hospital but died there, police said.

Meanwhile, the man fled on foot and initially escaped by stealing a vehicle, police said.

Shortly after 9 p.m., authorities released a photo of the suspected gunman, identified as 34-year-old James K. Decoursey of Hopkinsville, and asked the public to be on the lookout for a stolen white 1997 GMC pickup truck.

Later that night, police received a call saying that a man matching Decoursey’s description was spotted asking for a cigarette in a parking lot in Clarksville, Tenn., about 30 miles south of Hopkinsville. Several agencies responded.

“Decoursey appears to have ignored repeated commands and the situation escalated,” the Tennessee Bureau of Investigation stated.

Around midnight, police officers shot and killed Decoursey in Clarksville, the agency said.

Kentucky State Police said it is investigating the first shooting in Hopkinsville, while the Tennessee Bureau of Investigation is gathering evidence from the second shooting in Clarksville.

It was unclear how police had confirmed the gunman was impersonating a police officer, or how the suspect had gotten Meacham to pull over. Hopkinsville and Kentucky State police did not immediately respond to requests for comment Friday morning.

At a news conference Thursday night, Hopkinsville Police Chief Clayton Sumner said Decoursey was “known to police” but did not elaborate.

“I know the name from when I was an officer on the street,” Sumner told reporters.

According to WSMV News, Decoursey’s criminal history included a burglary charge, credit card fraud and five arrests for possession of methamphetamine.

Sumner teared up as he told reporters of Meacham’s death. Meacham had been with the Hopkinsville Police Department since May 2017. Before that, he was with the Christian County Sheriff’s Department for about 14 years, the Associated Press reported.

Meacham is survived by his wife and two young children, the department said.

“We’re here, and we’ll get through it. That’s what we do,” an emotional Sumner said. “This is new to me. I don’t know how to do this. I don’t know what I’m supposed to say. Just ask for everybody’s support.”

Hopkinsville Mayor Carter Hendricks said Thursday that Meacham was a lifelong resident of Christian County, in southwestern Kentucky.

“Words feel insufficient in times like these,” Hendricks said. “But, our presence and our prayers do matter. I encourage each of you to do your part to bring comfort to the family and all affected by this tragedy.”

Kentucky Gov. Matt Bevin (R) also paid tribute to the slain police officer Thursday.

Read more: