A Kentucky State Police trooper wanted to do a favor for the driver he pulled over late at night. It turned out the man was driving with a suspended license, so the lawman was arranging for overnight lodging for the man and his fellow travelers, including two children.

Those plans soon unraveled, with tragic results. During the stop on a rural stretch of interstate, the driver took off. What ensued was a chain of events that led to the deaths of the lawman and the suspect, authorities said.

Trooper Joseph Cameron Ponder, 31, was shot by the suspect during a second stop late Sunday in western Kentucky, Trooper Jay Thomas, a state police spokesman, said Monday.

Ponder, a Navy veteran, had been on the state police force less than a year.

"He was trying to help them out, and for an unknown reason, the driver fled," Thomas said.

"At the initial stop, it was his intent to put them all in a hotel without having to apprehend the driver," Thomas added. "After he initiated the pursuit, I'm sure his mind was changed on that."

The suspect, 25-year-old Joseph Thomas Johnson-Shanks of Florissant, Missouri, ran away after Ponder was shot.

Johnson-Shanks was found after a massive overnight manhunt in a wooded area about 9 miles from the initial stop and less than a mile from where the trooper had been gunned down, Thomas said.

Johnson-Shanks drew a weapon at police, ignored commands to drop his weapon and was shot Monday, Thomas said. He died later at a hospital.

Ponder made the initial stop because the suspect was driving 103 mph while heading westbound on Interstate 24, Thomas said.

Police investigators were still trying to piece together what spurred Johnson-Shanks to flee during the initial stop. Johnson-Shanks had four passengers: two adult women and two young children. Neither of the other adults in the car had a driver's license, Thomas said.

An 18-year-old woman in the car, Johnson-Shanks' niece, Ambrea R.J. Shanks of Florissant, was charged with first-degree hindering prosecution or apprehension and taken to jail Monday, police said.

"It's tragic on both sides," Thomas said. "Not only on our side, but also on the suspect's side. It's a tragic day for two families: the state police family and Mr. Johnson-Shanks' family as well."

Ponder pursued the suspect, with speeds reaching up to 115 mph, Thomas said. The chase ended when the suspect's car stopped abruptly, and the front side of the trooper's cruiser nudged the rear side of the suspect's vehicle, Thomas said.

"At that point, the suspect leaned out of the driver-side window and fired multiple rounds at the trooper's car, striking the hood, the windshield and striking our trooper," Thomas said.

Ponder was taken to a hospital, where he died shortly before midnight.

Ponder had graduated from the Kentucky State Police training academy in January and was stationed at the state police post in Mayfield, police said.

Late Monday afternoon, several dozen people from law enforcement agencies and the public formed a semi-circle for a vigil on the front lawn of Ponder's police post. As flags fluttered at half-staff, prayers were said, and visitors walked around afterward shaking the hands of law enforcement officers who attended.

"These guys go out every day and lay their life on the line," said Ronnie Stinson, who participated in the vigil. "And people need to respect them for that."

Ponder was proud to be a Kentucky state trooper, Thomas said, adding: "He was new, he was eager and just absolutely loved his job."

State police spokesman Sgt. Michael Webb said Ponder was in the Navy for several years and stationed in Hawaii for some of that time. Ponder had been a Navy diver, Webb said.

State police said several law enforcement agencies, as well as helicopters and dogs, were used to help with search efforts. Thomas said there are numerous vacant summer homes in the area.

A 9-mile stretch of Interstate 24 was shut down while investigators collected evidence but had been reopened by Monday afternoon, police said.

Shawn McGuire, a St. Louis County police spokesman, said Johnson-Shanks had been arrested in August 2014 for failing to appear in an unspecified case. In May of this year, investigators began searching for him for questioning in the theft of lottery tickets.

Ponder is the second trooper from the Mayfield post to be killed in the line of duty this year.

In June, 23-year-old Erick K. Chrisman died in a traffic crash while responding to a reckless driving complaint. He had also graduated from the police academy in January.

"We're all just holding together the best that we can and just continue to do our jobs," Thomas said.

Kentucky Gov. Steve Beshear called the shooting a "tragic reminder of the risks that our law enforcement officers face every day just by putting on their uniform and doing their job."

"That he was killed in the line of duty makes his death memorable, but we must never forget the most significant part of Trooper Joseph Cameron Ponder's story: how he lived, his selfless service to others, and his willingness to give his life for that commitment," the governor said.