We propose a gravitational theory in which the effective Lagrangian of the gravitational field is given by an arbitrary function of the Ricci scalar, the trace of the matter energy-momentum tensor, and the contraction of the Ricci tensor with the matter energy-momentum tensor. The matter energy-momentum tensor is generally not conserved, thus leading to the appearance of an extra-force, acting on massive particles in a gravitational field. The stability conditions of the theory with respect to local perturbations are also obtained. The cosmological implications of the theory are investigated, representing an exponential solution. Hence a Ricci tensor – energy-momentum tensor coupling may explain the recent acceleration of the Universe, without resorting to the mysterious dark energy.