Using a data sample corresponding to an integrated luminosity of 2.0 fb-1, collected by the LHCb experiment, the production of the ηc(1 S) state in proton–proton collisions at a centre-of-mass energy of s=13TeV is studied in the rapidity range 2.0 < y< 4.5 and in the transverse momentum range 6.5<pT<14.0GeV. The cross-section for prompt production of ηc(1 S) mesons relative to that of the J/ ψ meson is measured using the pp¯ decay mode and is found to be σηc(1S)/σJ/ψ=1.69±0.15±0.10±0.18. The quoted uncertainties are, in order, statistical, systematic and due to uncertainties on the branching fractions of the J/ψ→pp¯ and ηc→pp¯ decays. The prompt ηc(1 S) production cross-section is determined to be σηc(1S)=1.26±0.11±0.08±0.14μb, where the last uncertainty includes that on the J/ ψ meson cross-section. The ratio of the branching fractions of b-hadron decays to the ηc(1 S) and J/ ψ states is measured to be Bb→ηcX/Bb→J/ψX=0.48±0.03±0.03±0.05, where the last uncertainty is due to those on the branching fractions of the J/ψ→pp¯ and ηc→pp¯ decays. The difference between the J/ ψ and ηc(1 S) masses is also determined to be 113.0±0.7±0.1MeV, which is the most precise single measurement of this quantity to date.