Ford Motor is recalling 1.46 million Ford Focus cars in North America to fix a defect that could lead to stalling.

The recall affects the 2012 through 2018 model-year Focus with 2-liter GDI and 2-liter GTDI engines.

Ford warned that customers should keep their fuel tanks at least half full until their cars are fixed.

The issue stems from a defective canister purge valve that could become stuck in an open position, causing deformation of the fuel tank.

In certain instances, the defect could cause the Focus to stall and then not restart or have difficulty restarting. Car owners may notice an indicator light or a fuel gauge delivering inaccurate levels.

The recall includes about 1.28 million cars in the U.S., 136,000 in Canada and 45,000 in Mexico.

The company said it had not identified any crashes connected to the defect.

Ford dealers will repair the cars for free. Technicians will reprogram a powertrain module with new software and will replace various parts, including the canister purge valve, if necessary.

Customers will be notified directly if they're affected.

Follow USA TODAY reporter Nathan Bomey on Twitter @NathanBomey.