Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Hyundai is recalling and replacing the engines in nearly a half-million Sonata sedans in the U.S. because of a manufacturing defect that could cause them to stall.

The recall covers 470,000 vehicles made between Dec. 11, 2009, and Apr. 12, 2012 at the company’s Alabama assembly plant equipped with 2-liter or 2.4 liter gasoline engines.

A Hyundai Sonata on display at an auto expo in India. Saurabh Das / AP

A document published by the U.S. National Highway Traffic Safety Administration state that metallic debris may remain in the crankshaft area, restricting oil flow.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“Engine failure would result in a vehicle stall, increasing the risk of a crash,” it says.

Worn parts “will produce a metallic, cyclic knocking noise from the engine,” it said.

Dealers will inspect the cars and replace engines at no cost to owners, a company spokesman said. Hyundai spokesman Jim Trainor declined to tell The Associated Press how much it will cost to replace each engine.

The company also is recalling nearly 100,000 Accent small cars because the brake lights can fail.

Both recalls are separate from the global crisis surrounding Volkswagen and emissions.