A police sergeant told of his "panic" when a man he was restraining suddenly became unresponsive.
Duncan Tomlin, 32, who had epilepsy, died in July 2014 after being arrested in Haywards Heath, West Sussex.
Sgt Christopher Glasspool told an inquest jury Mr Tomlin had been "violently kicking out" at officers in the back of a police van.
When he suddenly stopped struggling, Sgt Glasspool said: "I realised it wasn't compliance, it was a problem."
Sgt Glasspool had been called as back-up when officers struggled to restrain Mr Tomlin, who, West Sussex Coroner's Court had previously heard, had been drinking and taking drugs.
The jury was shown footage from a camera inside the police van, showing Mr Tomlin lying on his front with his hands cuffed behind him and surrounded by officers.
Sgt Glasspool denied the reason Mr Tomlin had been shouting and screaming was because he was in pain.
He said: "We were all telling him to calm down, to stop struggling and stop resisting… Duncan was still shouting and screaming incoherently and aggressively.
"He just suddenly stopped."
He added: "I was starting to panic, I was really concerned for Duncan... I didn't know why it had happened."
The jury was shown body-worn camera footage from another officer in the van, showing the officers agree to drive Mr Tomlin directly to hospital as the ambulance was too far away.
En route he stopped breathing, and the officers performed CPR.
Sgt Glasspool acknowledged it took four minutes for them to take Mr Tomlin from the van, but he said he had been trained to perform CPR only when someone had stopped breathing.
He said: "I was fairly distraught, to be honest, this man was dying in front of me."
Mr Tomlin had suffered a cardiac arrest, and died in hospital two days later.
The inquest continues.