In the present paper a new cosmological model is proposed by extending the Einstein–Hilbert Lagrangian with a generic functional $$\tilde{f}(R,P)$$
f
~
(
R
,
P
)
, which depends on the scalar curvature R and a term P which encodes a possible influence from specific cubic contractions of the Riemann tensor. After proposing the corresponding action, the associated modified Friedmann relations are deduced, in the case where the generic functional has the following decomposition, $$\tilde{f}(R,P)=f(R)+g(P)$$
f
~
(
R
,
P
)
=
f
(
R
)
+
g
(
P
)
. The present study takes into account the power-law and the exponential decomposition for the specific form of the corresponding generic functional. For the analytical approach the specific method of dynamical system analysis is employed, revealing the fundamental properties of the phase space structure, discussing the dynamical consequences for the cosmological solutions obtained. It is revealed that the cosmological solutions associated to the critical points can explain various dynamical eras, with a high sensitivity to the values of the corresponding parameters, encoding different effects due to the geometrical nature of the specific couplings.