This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Tesla is recalling more than 2 million vehicles across its model lineup to fix a defective system that’s supposed to ensure drivers are paying attention when they use Autopilot.

Documents posted Wednesday by U.S. safety regulators say the company will send out a software update to fix the problems.

The recall comes after a two-year investigation by U.S. auto safety regulators into a series of crashes that happened while the Autopilot partially automated driving system was in use. Some were deadly.

FILE – The Tesla company logo shines off the rear deck of an unsold 2020 Model X at a Tesla dealership, April 26, 2020, in Littleton, Colo. On Tuesday, Dec. 12, 2023, Virginia authorities determined that a Tesla was operating on its Autopilot system and was speeding in the moments leading to a crash with a crossing tractor-trailer last July that killed the Tesla driver. (AP Photo/David Zalubowski, File)

The National Highway Traffic Safety Administration says its investigation found Autopilot’s method of ensuring that drivers are paying attention can be inadequate and “can lead to foreseeable misuse of the system.”

The recall covers nearly all of the vehicles Tesla sold in the U.S. since it activated Autopilot late in 2015.

Auto safety advocates for years have been calling for stronger regulation of the driver monitoring system, which mainly detects whether a driver’s hands are on the steering wheel.

Autopilot can steer, accelerate and brake automatically in its lane, but is a driver-assist system and cannot drive itself despite its name. Independent tests have found that the monitoring system is easy to fool, so much that drivers have been caught while driving drunk or even sitting in the back seat.

In its defect report filed with the safety agency, Tesla said Autopilot’s controls “may not be sufficient to prevent driver misuse.”

A message was left early Wednesday seeking further comment from the Austin, Texas, company.