A search for three-jet hadronic resonance production in pp collisions at a centre-of-mass energy of 8 TeV has been conducted by the CMS Collaboration at the LHC with a data sample corresponding to an integrated luminosity of 19.4 fb−119.4 fb−1. The search method is model independent, and events are selected that have high jet multiplicity and large values of jet transverse momenta. The signal models explored assume R-parity-violating supersymmetric gluino pair production and have final states with either only light-flavour jets or both light- and heavy-flavour jets. No significant deviation is found between the selected events and the expected standard model multijet and View the MathML sourcett¯ background. For a gluino decaying into light-flavour jets, a lower limit of 650 GeV on the gluino mass is set at a 95% confidence level, and for a gluino decaying into one heavy- and two light-flavour jets, gluino masses between 200 and 835 GeV are, for the first time, likewise excluded.