Federal regulators are investigating Tesla's autopilot feature after a fatal crash involving a tractor trailer and one of its Model S cars.

The U.S. National Highway Traffic Safety Administration opened the investigation after a man was killed while driving a Model S with the self-driving mode engaged.

"This is the first known fatality in just over 130 million miles where Autopilot was activated," Tesla said in a statement Thursday. It called the incident a "tragic loss."

The car was on a divided highway when a tractor trailer apparently turned in front of it. "Neither Autopilot nor the driver noticed the white side of the tractor trailer against a brightly lit sky, so the brake was not applied," Tesla said.

The Model S drove under the larger vehicle, and the underside of the tractor trailer slammed into the Tesla's windshield.

It may have been be the first fatal accident involving a self-driving car. It happened in May, and Tesla said the NHTSA notified it of the investigation Wednesday.

It's a setback for the auto maker and one that could make federal and state regulators wary as they consider new policies to allow more self-driving cars on the road.

Tesla's Autopilot uses a combination of cameras, radar and ultrasonic sensors to automatically steer a vehicle along the highway, change lanes and adjust its speed in response to traffic.

The safety of the autopilot system depends on its ability to accurately interpret its surroundings, and its failure to see a white truck against the bright sky shows it's not perfect.

"It is important to note that Tesla disables Autopilot by default and requires explicit acknowledgement that the system is new technology and still in a public beta phase before it can be enabled," the company said.

Had the car hit the front or rear of the trailer, even at high speed, its "advanced crash safety system" probably would have prevented serious injury, Tesla said, but that wasn't the case.

Advocates for self-driving cars say they have the potential to significantly reduce accidents. Besides Tesla, Google and several of the biggest automakers are all working on technologies to automate all or parts of the driving experience.

In January, the National Highway Traffic Safety Administration said it was using "all of its available tools to accelerate the deployment of technologies that can eliminate 94 percent of fatal crashes involving human error."

The NHTSA is the agency now investigating Tesla, which called it "a preliminary evaluation to determine whether the system worked according to expectations."

The crash reportedly happened in central Florida. According to The Verge, the driver had previously posted a video of himself avoiding a collision with the autopilot feature engaged.

Tesla says drivers are supposed to keep their hands on the wheel and remain alert when autopilot is turned on. Another video posted late last year shows not all drivers follow those instructions.

"Autopilot is getting better all the time, but it is not perfect and still requires the driver to remain alert," Tesla said.

"Nonetheless, when used in conjunction with driver oversight, the data is unequivocal that Autopilot reduces driver workload and results in a statistically significant improvement in safety when compared to purely manual driving."