  We consider nonlocal modification of the Einstein theory of gravity in
framework of the pseudo-Riemannian geometry. The nonlocal term has the form
$\mathcal{H}(R) \mathcal{F}(\Box)\mathcal {G}(R)$, where $\mathcal{H}$ and
$\mathcal{G}$ are differentiable functions of the scalar curvature $R,$ and $
\mathcal{F}(\Box)= \displaystyle \sum_{n =0}^{\infty} f_{n}\Box^{n}$ is an
analytic function of the d'Alambert operator $\Box .$ Using calculus of
variations of the action functional, we derived the corresponding equations of
motion. The variation of action is induced by variation of the gravitational
field, which is the metric tensor $g_{\mu\nu}$. Cosmological solutions are
found for the case when the Ricci scalar $R$ is constant.
