Ford is recalling nearly 1.5 million Focus compact cars in North America because a fuel system problem can cause the engines to stall without warning.

The recall covers cars from the 2012 through 2018 model years with 2-liter four-cylinder engines.

Ford says a valve in the fuel system can stick in the open position, causing too much vacuum, and an engine control computer may not detect the problem. Excessive vacuum can cause the gas tank to deform, as well as other problems.

The recall came after the U.S. government's National Highway Traffic Safety Administration presented owner complaints to Ford. About 1.3 million of the recalled vehicles are in the U.S.

Dealers will reprogram the computer with new software that will detect a stuck valve, which the company says will take care of the problem in most cases. They'll also inspect the valve, a carbon canister and gas tank and replace them if needed.

Ford says owners should keep the gas tank at least half full until repairs are made.

The company says it's not aware of any crashes or injuries caused by the problem.

The recall is expected to begin on Dec. 10.

WATCH: Ford is using bionic suits to help employees work safer