The rate of increase of longevity has varied considerably across U.S. states since 1991. This paper examines the effect of the quality of medical care, behavioral risk factors (obesity, smoking, and AIDS incidence), and other variables (education, income, and health insurance coverage) on life expectancy and medical expenditure using longitudinal state-level data. We examine the effects of three different measures of the quality of medical care. The first is the average quality of diagnostic imaging procedures, defined as the fraction of procedures that are advanced procedures. The second is the average quality of practicing physicians, defined as the fraction of physicians that were trained at top-ranked medical schools. The third is the mean vintage (FDA approval year) of outpatient and inpatient prescription drugs. Life expectancy increased more rapidly in states where (1) the fraction of Medicare diagnostic imaging procedures that were advanced procedures increased more rapidly; (2) the vintage of self- and provider-administered drugs increased more rapidly; and (3) the quality of medical schools previously attended by physicians increased more rapidly. States with larger increases in the quality of diagnostic procedures, drugs, and physicians did not have larger increases in per capita medical expenditure.