  We continue our study of the mixed Einstein-Hilbert action as a functional of
a pseudo-Riemannian metric and a linear connection. Its geometrical part is the
total mixed scalar curvature on a smooth manifold endowed with a distribution
or a foliation. We develop variational formulas for quantities of extrinsic
geometry of a distribution on a metric-affine space and use them to derive
Euler-Lagrange equations (which in the case of space-time are analogous to
those in Einstein-Cartan theory) and to characterize critical points of this
action on vacuum space-time. Together with arbitrary variations of metric and
connection, we consider also variations that partially preserve the metric,
e.g., along the distribution, and also variations among distinguished classes
of connections (e.g., statistical and metric compatible, and this is expressed
in terms of restrictions on contorsion tensor). One of Euler-Lagrange equations
of the mixed Einstein-Hilbert action is an analog of the Cartan spin connection
equation, and the other can be presented in the form similar to the Einstein
equation, with Ricci curvature replaced by the new Ricci type tensor. This
tensor generally has a complicated form, but is given in the paper explicitly
for variations among semi-symmetric~connections.
