Breathing in heavy traffic fumes can trigger a heart attack, say UK experts.
Heart attack risk is raised for about six hours post-exposure and goes down again after that, researchers found.
They say in the British Medical Journal that pollution probably hastens rather than directly cause attacks.
But repeated exposure is still bad for health, they say, substantially shortening life expectancy, and so the advice to people remains the same - avoid as far as is possible.
Prof Jeremy Pearson, associate medical director at the British Heart Foundation, which co-funded the study, said: "This large-scale study shows conclusively that your risk of having a heart attack goes up temporarily, for around six hours, after breathing in higher levels of vehicle exhaust.
"We know that pollution can have a major effect on your heart health, possibly because it can 'thicken' the blood to make it more likely to clot, putting you at higher risk of a heart attack.
"Our advice to patients remains the same - if you've been diagnosed with heart disease, try to avoid spending long periods outside in areas where there are likely to be high traffic pollution levels, such as on or near busy roads."
The research looked at the medical records of almost 80,000 heart attack patients in England and Wales, cross-referencing these details with air pollution data.
This enabled the investigators to plot hourly levels of air pollution (PM10, ozone, CO, NO2, and SO2) against onset of heart attack symptoms and see if there was any link.
Higher levels of air pollution did appear to be linked with onset of a heart attack lasting for six hours after exposure.
After this time frame, risk went back down again.
Krishnan Bhaskaran from the London School of Hygiene and Tropical Medicine, who led the research, said the findings suggested that pollution was not a major contributing factor to heart attacks.
For example, being exposed to a spell of medium-level rather than low-level pollution would raise heart attack risk by 5%, by his calculations.
"If anything, it looks like it brings heart attack forward by a few hours. These are cardiac events that probably would have happened anyway."
But he said the findings should not detract from the fact that chronic exposure to air pollution was hazardous to health.
Prof Pearson from the BHF agrees: "Unhealthy diets and smoking etc are much bigger heart attack risk factors, but car fumes are the cream on the cake that can tip you over."