A Mississippi police officer helped a driver out of a wrecked sports car and told the man he was "lucky to be alive." Less than an hour later, the officer was killed by another person who walked up and shot him outside the police station.

Biloxi police records show Patrolman Robert McKeithen (muh-KEETH-en) responded to a crash Sunday night and then returned to the station because he had gotten a flat tire.

The driver, 22-year-old Damon Corrigan, told the Sun Herald he crashed after falling asleep at the wheel on the bridge over Biloxi Bay. He said the left side of his Ford Mustang was destroyed and McKeithen helped him get out of the car. Corrigan said McKeithen also accompanied him to a hospital.

Corrigan said he was shocked to learn McKeithen had been killed.

"The only thing I remember him telling me was that I was so lucky to be alive," Corrigan told the newspaper. "He was so nice. I felt so bad."

McKeithen, 57, had worked for Biloxi Police Department for almost 24 years.

Darian (DEHR-uhn) Atkinson, 19, of Biloxi, is charged with capital murder in the officer's death.

A sworn statement filed by a sheriff's deputy, Nickolas Pennington, said surveillance video at the police station showed a man walking up behind McKeithen and shooting him several times, according to WLOX-TV . The video then showed the shooter running through the parking lot.

McKeithen's wife, Pamela McKeithen, said in a video released by the city of Biloxi that her husband loved being a police officer.

"Besides his family, that was his life," she said. "He took meticulous care of his uniforms, like 'Don't touch it. I've got this.' He was going to make sure everything is in its place on his uniform. He would iron it every day, shine his boots."

Darian Atkinson was arrested Monday in Wiggins, about 40 miles (65 kilometers) north of the crime scene.

His 21-year-old brother, Davian Atkinson, and two other men, Dalentez Brice, 20, and Joshua Kovach, 21, have been charged with accessory after the fact in the killing.

Investigators say they believe Davian Atkins drove his brother to Wiggins and let him make phone calls. Davian Atkinson told a judge Wednesday he would hire an attorney, but it was not immediately clear whether he had done so by Thursday.

Brice and Kovach were arrested Wednesday and were being held without bond. It was also not immediately known whether either has a lawyer who could be reached for comment.

Darian Atkinson's mother, Pamela Broger, told The Associated Press on Tuesday that her son had been having mental health problems in recent months. She said she had to call police to her home because of him.

Darian Atkinson smiled and hummed as he was led into a courtroom Wednesday at the Harrison County Jail in Gulfport, where he made an initial appearance on the capital murder charge. He was wearing a knee-length sleeveless vest the sheriff said is for inmates considered suicide risks.

Darian Atkinson told Justice Court Judge Brandon Ladner he didn't know if he would need a public defender because he had not been able to call his family.