A highly significant structure is observed in the Λ+cK−π+π+ mass spectrum, where the Λ+c baryon is reconstructed in the decay mode pK−π+. The structure is consistent with originating from a weakly decaying particle, identified as the doubly charmed baryon Ξ++cc. The difference between the masses of the Ξ++cc and Λ+c states is measured to be 1334.94±0.72(stat.)±0.27(syst.) MeV/c2, and the Ξ++cc mass is then determined to be 3621.40±0.72(stat.)±0.27(syst.)±0.14(Λ+c) MeV/c2, where the last uncertainty is due to the limited knowledge of the Λ+c mass. The state is observed in a sample of proton-proton collision data collected by the LHCb experiment at a center-of-mass energy of 13 TeV, corresponding to an integrated luminosity of 1.7 fb−1, and confirmed in an additional sample of data collected at 8 TeV.