A search is presented for the associated production of a standard model Higgs boson with a top quark-antiquark pair (t t ¯ H), in which the Higgs boson decays into a b quark-antiquark pair, in proton-proton collisions at a centre-of-mass energy s=13 TeV. The data correspond to an integrated luminosity of 35.9 fb −1 recorded with the CMS detector at the CERN LHC. Candidate t t ¯ H events are selected that contain either one or two electrons or muons from the t t ¯ decays and are categorised according to the number of jets. Multivariate techniques are employed to further classify the events and eventually discriminate between signal and background. The results are characterised by an observed t t ¯ H signal strength relative to the standard model cross section, μ = σ/σ SM , under the assumption of a Higgs boson mass of 125 GeV. A combined fit of multivariate discriminant distributions in all categories results in an observed (expected) upper limit on μ of 1.5 (0.9) at 95% confidence level, and a best fit value of 0.72 ± 0.24(stat) ± 0.38(syst), corresponding to an observed (expected) signal significance of 1.6 (2.2) standard deviations above the background-only hypothesis.[Figure not available: see fulltext.].