Tesla has agreed to pay out millions in compensation to car owners over delays to its Autopilot feature.

The electric car company settled for $5.4m (£4.2m) with customers who complained that they had paid $5,000 for the Enhanced Autopilot technology but had been forced to wait months longer than promised.

Customers will receive between $25 and $280, depending on when they bought their car.

The extra features in Enhanced Autopilot included automatic lane changing, parking and assisted steering software.

Tesla announced the new feature in October 2016 and said it would be launched in December that year, but some customers still did not have it by September 2017.

The company has become notorious for failing to meet optimistic deadlines for new features and products.

The Autopilot system itself has also attracted controversy, with lead plaintiff Dean Sheikh complaining in the original lawsuit that once installed, it was "unpredictable" and unsafe.

Drivers who take their hands off the wheel when Autopilot is enabled are prompted to put them back on with visual and audible warnings, but there have been fatal accidents where drivers have appeared to ignore these.

In March a driver in California died after his Tesla slammed into a concrete barrier while Autopilot was enabled, the second fatal crash in the US which involved the system.