We investigate Palatini f (R, Lm, Rµν T µν ) modified theories of gravity wherein the metric and affine connection are treated as independent dynamical fields and the gravitational Lagrangian is made a function of the Ricci scalar R, the matter Lagrangian density Lm, and a "matter-curvature scalar" Rµν T µν . The field equations and the equations of motion for massive test particles are derived, and we show that the independent connection can be expressed as the Levi-Civita connection of an auxiliary, energy-momentum dependent metric, related to the physical metric by a matrix transformation. Similar to metric f (R, T, Rµν T µν ) gravity, the field equations impose the nonconservation of the energy-momentum tensor, leading to an appearance of an extra force on massive test particles. We obtain the explicit form of the field equations for massive test particles in the case of a perfect fluid, and an expression for the extra force. The nontrivial modifications to scalar fields and both linear and nonlinear electrodynamics are also considered. Finally, we detail the conditions under which the present theory is equivalent to the Eddington-inspired Born-Infeld (EiBI) model.