Searches for the rare hadronic decays B0→p¯pp¯p and B0s→p¯pp¯p are performed using proton-proton collision data recorded by the LHCb experiment and corresponding to an integrated luminosity of 9 fb−1. Significances of 9.3σ and 4.0σ, including statistical and systematic uncertainties, are obtained for the B0→p¯pp¯p and B0s→p¯pp¯p signals, respectively. The branching fractions are measured relative to the topologically similar normalization decays B0→J/ψ(→p¯p)K*0(→K+π−) and B0s→J/ψ(→p¯p)ϕ(→K+K−). The branching fractions are measured to be B(B0→p¯pp¯p)=(2.2±0.4±0.1±0.1)×10−8 and B(B0s→p¯pp¯p)=(2.3±1.0±0.2±0.1)×10−8. In these measurements, the first uncertainty is statistical, the second is systematic, and the third one is due to the external branching fraction of the normalization channel.