A man being transported to a hospital after injuring himself at a gym ended up under arrest Sunday — after police said he attacked the ambulance medical technician caring for him.

Demitri Nemorin, 22, of Sussex Road, Elmont, was arrested and charged with second-degree assault and fourth-degree criminal mischief after being transported to the hospital, Nassau County police said. He is scheduled for arraignment Monday in First District Court in Hempstead.

advertisement | advertise on newsday

The AMT, identified only as a 36-year-old man, was part of a Nassau County police ambulance crew that responded to a 911 call at XSport Fitness in Roosevelt Field in East Garden City just before 6:30 p.m. on Sunday, police said.

Police said that, while being transported to the hospital, Nemorin became combative — and began attacking the AMT. The driver, a Third Precinct officer, pulled over — and went to assist his partner. The two restrained Nemorin, police said, who then was taken for treatment and arrested.