We compute the full set of second-order inertial corrections to the instantaneous force and torque acting on a small spherical rigid particle moving unsteadily in a general steady linear flow. This is achieved by using matched asymptotic expansions and formulating the problem in a coordinate system co-moving with the background flow. Effects of unsteadiness and fluid-velocity gradients are assumed to be small, but to dominate in the far field over those of the velocity difference between the body and fluid, making the results essentially relevant to weakly positively or negatively buoyant particles. The outer solution (which at first order is responsible for the Basset–Boussinesq history force at short time and for shear-induced forces such as the Saffman lift force at long time) is expressed via a flow-dependent tensorial kernel. The second-order inner solution brings a number of different contributions to the force and torque. Some are proportional to the relative translational or angular acceleration between the particle and fluid, while others take the form of products of the rotation/strain rate of the background flow and the relative translational or angular velocity between the particle and fluid. Adding the outer and inner contributions, the known added-mass force or the spin-induced lift force are recovered, and new effects involving the velocity gradients of the background flow are revealed. The resulting force and torque equations provide a rational extension of the classical Basset–Boussinesq–Oseen equation incorporating all first- and second-order fluid inertia effects resulting from both unsteadiness and velocity gradients of the carrying flow.