Solution (source code)

= Solution

For every <valuation ring> $D$ with <fraction field> $K$, consider compatible <morphisms of schemes>
$$
u:\operatorname{Spec}K\to X,\qquad v:\operatorname{Spec}D\to S,\qquad fu=v|_{\operatorname{Spec}K}.
$$
An extension is a <morphism of schemes> $\ell:\operatorname{Spec}D\to X$ satisfying $\ell|_{\operatorname{Spec}K}=u$ and $f\ell=v$. The <valuative criterion for universal closedness> states
$$
\boxed{f\text{ universally closed}\iff f\text{ quasi-compact and every such pair admits an extension}.}
$$
Equivalently, among <quasi-compact morphisms>, the existence condition characterizes <universal closedness>. A <universally closed morphism> is automatically a <quasi-compact morphism>; the converse direction of the criterion needs this compactness condition. All <valuation rings> are allowed, with arbitrary <fraction fields>; there is no <Noetherian ring> hypothesis and one cannot replace them by <discrete valuation rings> without additional assumptions.https://stacks.math.columbia.edu/tag/01KF[Stacks Project, valuative criterion of universal closedness]{ref}https://stacks.math.columbia.edu/tag/04XU[Stacks Project, universally closed morphisms are quasi-compact]{ref}