Tesla is recalling over 1.8 million vehicles in the United States due to risk of software failure to detect unlatched hood, the National Highway Traffic Safety Administration (NHTSA) said on Tuesday.

An unlatched hood could fully open and obstruct the driver's view, raising the risk of a crash. The recall applies to certain 2021-2024 Model 3, Model S, Model X, and 2020-2024 Model Y vehicles.

Tesla released an over-the-air software update to fix the issue, NHTSA added.

Last month, Tesla said it was recalling most Cybertrucks in the country over issues with their windshield wipers and exterior trim.

(Reporting by Disha Mishra in Bengaluru; Editing by Shinjini Ganguli)