Protons consist of three valence quarks, two up-quarks and one down-quark, held together by gluons and a sea of quark-antiquark pairs. Collectively, quarks and gluons are referred to as partons. In a proton-proton collision, typically only one parton of each proton undergoes a hard scattering – referred to as single-parton scattering – leaving the remainder of each proton only slightly disturbed. Here, we report the study of double- and triple-parton scatterings through the simultaneous production of three J/ψ mesons, which consist of a charm quark-antiquark pair, in proton-proton collisions recorded with the CMS experiment at the Large Hadron Collider. We observed this process – reconstructed through the decays of J/ψ mesons into pairs of oppositely charged muons – with a statistical significance above five standard deviations. We measured the inclusive fiducial cross-section to be 272−104+141(stat)±17(syst)fb, and compared it to theoretical expectations for triple-J/ψ meson production in single-, double- and triple-parton scattering scenarios. Assuming factorization of multiple hard-scattering probabilities in terms of single-parton scattering cross-sections, double- and triple-parton scattering are the dominant contributions for the measured process.