A search for the pair production of the lightest supersymmetric partner of the top quark, the top squark (t ~1), is presented. The search targets the four-body decay of the t ~1 , which is preferred when the mass difference between the top squark and the lightest supersymmetric particle is smaller than the mass of the W boson. This decay mode consists of a bottom quark, two other fermions, and the lightest neutralino (χ~10), which is assumed to be the lightest supersymmetric particle. The data correspond to an integrated luminosity of 138 fb−1 of proton-proton collisions at a center-of-mass energy of 13 TeV collected by the CMS experiment at the CERN LHC. Events are selected using the presence of a high-momentum jet, an electron or muon with low transverse momentum, and a significant missing transverse momentum. The signal is selected based on a multivariate approach that is optimized for the difference between m(t ~1) and m(χ~10). The contribution from leading background processes is estimated from data. No significant excess is observed above the expectation from standard model processes. The results of this search exclude top squarks at 95% confidence level for masses up to 480 and 700 GeV for m(t ~1) − m(χ~10) = 10 and 80 GeV, respectively. [Figure not available: see fulltext.].