(Reuters) - A Kansas City, Kansas, police captain was shot and killed on Tuesday as he tried to reach a suspect, authorities said.

Police Captain Robert Melton had responded to a report of several people in a vehicle shooting at a man, police said in a statement.

Three or four people in the car ran when police arrived. Melton "attempted to make contact" with a suspect and was shot, the statement said.

Melton was taken to a hospital and died of his injuries, it said. Two people were in custody and one suspect was still at large.

National attention has been focused on attacks on law enforcement officers following the ambush killings of eight police officers in Dallas and Baton Rouge, Louisiana.

(Reporting by Ian Simpson; Editing by Jonathan Oatis)