The NA61/SHINE experiment at the CERN Super Proton Synchrotron (SPS) studies the onset of deconfinement in hadron matter by a scan of particle production in collisions of nuclei with various sizes at a set of energies covering the SPS energy range. This paper presents results on inclusive double-differential spectra, transverse momentum and rapidity distributions and mean multiplicities of π±, K±, p and pˉ produced in the 20% most central7Be+9Be collisions at beam momenta of 19A, 30A, 40A, 75A and 150A GeV/c. The energy dependence of the K±/π± ratios as well as of inverse slope parameters of the K± transverse mass distributions are close to those found in inelastic p+p reactions. The new results are compared to the world data on p+p and Pb+Pb collisions as well as to predictions of the Epos, Urqmd, Ampt, Phsd and Smash models