We present a precise BABAR measurement on the cross section of the process e+e− → π+π− (γ) from threshold to an energy of 3 GeV with the initial state radiation (ISR) technique, using 232 fb−1 of data collected with the BABAR detector at e+e− center-of-mass energies near 10.58 GeV. The ISR luminosity is determined from a study of the leptonic process e+e− → μ+μ−γ(γ). The leading-order hadronic contribution to the muon magnetic anomaly calculated using the ππ cross section measured from threshold to 1.8 GeV is (514.1 ± 2.2(stat) ±3.1(syst)) × 10−10.