Left ventricular (LV) systolic function and congestive heart failure (CHF) are important predictors of long-term mortality after acute myocardial infarction. The importance of transient CHF and the interaction of CHF and LV function on prognosis has not been studied in detail previously. In the TRAndolapril Cardiac Evaluation Study, 6,676 consecutive patients with acute myocardial infarction 1 to 6 days earlier had LV systolic function quantified as wall motion index (echocardiography), which is closely correlated to LV ejection fraction. To study the interaction of CHF and wall motion index on long-term mortality, separate analyses were performed in patients with different levels of LV function. Risk ratio (95% confidence intervals [CI]) were determined from proportional hazard models subgrouped by wall motion index or CHF adjusted for age and gender. Heart failure was separated into transient or persistent. Wall motion index and CHF are correlated. Furthermore, there is an interaction between wall motion index and CHF. The prognostic importance of wall motion index depends on whether patients have CHF or not: the risk ratio associated with decreasing 1 wall motion index unit is 3.0 (2.6 to 3.4) in patients with CHF, and 2.2 (1.7 to 2.9) in patients without CHF when adjusted for age and gender. Similarly, the prognostic importance of CHF depends on the level of wall motion index: the risk ratio associated with CHF is 3.9 (1.8 to 8.3) when the wall motion index is <0.8 and 1.9 (1.5 to 2.3) when the wall motion index is >1.6. Transient CHF is an independent risk factor (risk ratio 1.5, confidence interval [CI] 1.3 to 1.8) although milder than persistent CHF (risk ratio 2.8, CI 2.5 to 3.2).