Nissan is recalling thousands of Altima midsize cars for a third time to fix a latch problem that could let the hood fly open while the cars are moving.

Nissan says in documents filed with the U.S. government that paint can flake off the latch, exposing bare metal. Over time, the latches can rust and cause the secondary hood latch to remain open. If the main latch isn't closed and the car is driven, the secondary latch may not hold the hood.

The automaker says that in two previous recalls, dealers adjusted latches and applied lubricant. But if the lubricant wasn't put on evenly, the problem could persist.

Nissan will notify owners and replace the latch for free starting in mid-February.

This story is developing. Please check back for further updates.