A US driver made it to hospital while suffering a pulmonary embolism after putting his car into autopilot.

Joshua Neally was driving his Tesla Model X home from his office in the US city of Springfield, Missouri, to nearby Branson.

But after pulling onto the highway, he started suffering piercing pain in his stomach and chest.

Rather than call an ambulance, the lawyer decided to find a hospital using his car's self-driving mode.

Around 20 miles (32km) down the road, the 37-year-old's Tesla arrived at the road leading to the hospital emergency department.

He told Slate that he manually steered the electric vehicle in to the car park and checked himself in to the emergency room.

A pulmonary embolism is a potentially fatal obstruction of a blood vessel in the lungs.

Doctors say he was lucky to survive it while driving.

Tesla's autopilot, which automatically changes lanes and reacts to traffic, is under the microscope in America after it was involved in two crashes.

A man died in Florida after the driver-assist function in his Tesla Model S failed to detect a lorry in its path in May.

Then last month a driver was unhurt after his Model X car crashed after swerving to hit wooden rails next to a two-lane road in Montana.

The electric carmaker suggested that the function wasn't being used correctly at the time of the second accident.

The use of the technology is being investigated by the US road safety watchdog, the National Highway Traffic Safety Administration.

But Joshua Neally says he was happy to use the autopilot function and thinks it will save lives.

"I'm very thankful I had it for this experience," Joshua told local news station KY3.

"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."

Find us on Instagram at BBCNewsbeat and follow us on Snapchat, search for bbc_newsbeat