  In this paper, we prove that an algebraic fiber space $f:X\to Y$ over a
perfect field $k$ of characteristic $p>0$ with nef relative anti-canonical
divisor $-K_{X/Y}$ splits into the product after taking the base change along a
finite cover of $Y$, if the geometric generic fiber has mild singularities and
if one of the following conditions holds: (i) $k\subseteq\overline{\mathbb
F_p}$; (ii) $\pi^{et}(Y)$ is finite; (iii) $-K_X$ is semi-ample and $Y$ is an
abelian variety. As its application, we generalize Patakfalvi and Zdanowicz's
Beauville-Bogomolov decomposition in positive characteristic to the case when
the anti-canonical divisor is numerically equivalent to a semi-ample divisor,
which is applied to study the abundance conjecture in a new case and the
fundamental group of an $F$-split variety with semi-ample anti-canonical
divisor. We also show that a variety over a finite field with nef
anti-canonical divisor satisfying some conditions has a rational point.
Furthermore, to show the splitting theorem, we generalize partially Popa and
Schnell's global generation theorem and Viehweg's weak positivity theorem to
the case of generalized pairs in positive characteristic.
