Joshua Neally was helped to reach the nearest hospital in time by his brand-new Tesla Model X when he started having severe chest pains and potentially saved his life.

The 37 year old Neally felt a sudden biting pain in his chest when the air was sucked from his lungs while he was driving in his electric car from his law office in Springfield, Missouri, due to a blocked artery in his lungs. He let the car’s controversial autopilot carry him down the road toward a hospital as he was distracted by the pain and still in traffic.

“It was the most excruciating pain I’ve ever had. It was kinda getting scary. I called my wife and just said, ‘Something’s wrong,” he later told local KY3 news

“I just knew I had to get there, to the ER,” he said.

Neally was able to keep Tesla’s autopilot function active for 20 miles down the highway since this function requires a driver to touch the wheel only every few minutes. Due to fears that he would crash if the car were entirely in his control, he decided to trust the software even as he had considered stopping for an ambulance in the moment of crisis, he said. If a driver stops responding, a Tesla car fitted with autopilot, would guide cars to a stop on the side of the road.

“If something like that happens where I become unconscious or incapacitated while I’m driving. I’m not going to cross over the interstate and slam into somebody or slam into one of the big rock walls,” he said.

Neally eventually drove off the highway exit ramp and the rest of the way to the hospital after he had gathered his strength and took over driving.He has since recovered and continues to receive treatment.

Tesla did not respond to a request for comment.

This incident is diametrically the opposite of what happened to a man in Florida who was killed while watching a Harry Potter DVD and kept the Tesla car on autopilot in May. The car attempted to drive underneath the tractor-trailer “with the bottom of the trailer impacting the windshield of the Model S” as the car’s sensors failed to detect a white 18-wheel truck against a bright sky, according to Tesla.

A Tesla car crashed into a guardrail, drove across several lanes and flipped on to a roof in Pennsylvania while the Model X car was on autopilot on 1 July. Later charge of careless driving was slapped against the man behind the wheel.

Tesla said that data suggested the driver’s hands were off the wheel for more than two minutes, in violation of the autopilot terms of use in connection to another nonfatal crash in Montana that very same month.

“It’s not going to be perfect, there’s no technology that’s perfect, but I think the measure is that it’s better and safer,” said Neally while acknowledging those questions.

While the fatal Florida crash prompted a federal investigation, the crashes have raised questions over the safety of Tesla’s autopilot function. Noting that Tsla should have mentioned about the accident in an earlier filing, the Securities and Exchange Commission also reportedly opened an investigation into whether Tesla should have notified earlier.