Results are presented from searches for the standard model Higgs boson in proton–proton collisions at sqrt(s)=7 and 8 TeV in the Compact Muon Solenoid experiment at the LHC, using data samples corresponding to integrated luminosities of up to 5.1 fb−1 at 7 TeV and 5.3 fb−1 at 8 TeV. The search is performed in five decay modes: γγ, ZZ, W+W−, τ+τ−, and bbbar. An excess of events is observed above the expected background, with a local significance of 5.0 standard deviations, at a mass near 125 GeV, signalling the production of a new particle. The expected significance for a standard model Higgs boson of that mass is 5.8 standard deviations. The excess is most significant in the two decay modes with the best mass resolution, γγ and ZZ; a fit to these signals gives a mass of 125.3±0.4(stat.)±0.5(syst.) GeV. The decay to two photons indicates that the new particle is a boson with spin different from one.