Assume (1), (2), (3), and (4). We will verify the existence part of the valuative criterion for $f$ which will imply $f$ is universally closed by Lemma \ref{lemma-quasi-compact-existence-universally-closed}. To do this, consider a commutative diagram \begin{equation} \label{equation-start-with} \vcenter{ \xymatrix{ \Spec(K) \ar[r] \ar[d] & X \ar[d] \\ \Spec(A) \ar[r] & Y } } \end{equation} where $A$ is a valuation ring and $K$ is the fraction field of $A$. Note that since valuation rings and fields are reduced, we may replace $U$, $X$, and $S$ by their respective reductions by Properties of Spaces, Lemma \ref{spaces-properties-lemma-map-into-reduction}. In this case the assumption that $h(U)$ is dense means that the scheme theoretic image of $h : U \to X$ is $X$, see Lemma \ref{lemma-scheme-theoretic-image-reduced}. \medskip\noindent Reduction to the case $Y$ affine. Choose an \'etale morphism $\Spec(R) \to Y$ such that the closed point of $\Spec(A)$ maps to an element of $\Im(|\Spec(R)| \to |Y|)$. By Lemma \ref{lemma-lift-valuation-ring-through-flat-morphism} we can find a local ring map $A \to A'$ of valuation rings and a morphism $\Spec(A') \to \Spec(R)$ fitting into a commutative diagram $$ \xymatrix{ \Spec(A') \ar[r] \ar[d] & \Spec(R) \ar[d] \\ \Spec(A) \ar[r] & Y } $$ Since in Definition \ref{definition-valuative-criterion} we allow for extensions of valuation rings it is clear that we may replace $A$ by $A'$, $Y$ by $\Spec(R)$, $X$ by $X \times_Y \Spec(R)$ and $U$ by $U \times_Y \Spec(R)$. \medskip\noindent From now on we assume that $Y = \Spec(R)$ is an affine scheme. Let $\Spec(B) \to X$ be an \'etale morphism from an affine scheme such that the morphism $\Spec(K) \to X$ is in the image of $|\Spec(B)| \to |X|$. Since we may replace $K$ by an extension $K' \supset K$ and $A$ by a valuation ring $A' \subset K'$ dominating $A$ (which exists by Algebra, Lemma \ref{algebra-lemma-dominate}), we may assume the morphism $\Spec(K) \to X$ factors through $\Spec(B)$ (by definition of $|X|$). In other words, we may think of $K$ as a $B$-algebra. Choose a polynomial algebra $P$ over $B$ and a $B$-algebra surjection $P \to K$. Then $\Spec(P) \to X$ is flat as a composition $\Spec(P) \to \Spec(B) \to X$. Hence the scheme theoretic image of the morphism $U \times_X \Spec(P) \to \Spec(P)$ is $\Spec(P)$ by Lemma \ref{lemma-flat-base-change-scheme-theoretic-image}. By Lemma \ref{lemma-reach-points-scheme-theoretic-image} we can find a commutative diagram $$ \xymatrix{ \Spec(K') \ar[r] \ar[d] & U \times_X \Spec(P) \ar[d] \\ \Spec(A') \ar[r] & \Spec(P) } $$ where $A'$ is a valuation ring and $K'$ is the fraction field of $A'$ such that the closed point of $\Spec(A')$ maps to $\Spec(K) \subset \Spec(P)$. In other words, there is a $B$-algebra map $\varphi : K \to A'/\mathfrak m_{A'}$. Choose a valuation ring $A'' \subset A'/\mathfrak m_{A'}$ dominating $\varphi(A)$ with field of fractions $K'' = A'/\mathfrak m_{A'}$ (Algebra, Lemma \ref{algebra-lemma-dominate}). We set $$ C = \{\lambda \in A' \mid \lambda \bmod \mathfrak m_{A'} \in A''\}. $$ which is a valuation ring by Algebra, Lemma \ref{algebra-lemma-stack-valuation-rings}. As $C$ is an $R$-algebra with fraction field $K'$, we obtain a solid commutative diagram $$ \xymatrix{ \Spec(K'_1) \ar@{-->}[r] \ar@{-->}[d] & \Spec(K') \ar[r] \ar[d] & U \ar[r] & X \ar[d] \\ \Spec(C_1) \ar@{-->}[r] \ar@{-->}[rrru] & \Spec(C) \ar[rr] & & Y } $$ as in the statement of the lemma. Thus assumption (4) produces $C \to C_1$ and the dotted arrows making the diagram commute. Let $A_1' = (C_1)_\mathfrak p$ be the localization of $C_1$ at a prime $\mathfrak p \subset C_1$ lying over $\mathfrak m_{A'} \subset C$. Since $C \to C_1$ is flat by More on Algebra, Lemma \ref{more-algebra-lemma-valuation-ring-torsion-free-flat} such a prime $\mathfrak p$ exists by Algebra, Lemmas \ref{algebra-lemma-local-flat-ff} and \ref{algebra-lemma-ff-rings}. Note that $A'$ is the localization of $C$ at $\mathfrak m_{A'}$ and that $A'_1$ is a valuation ring (Algebra, Lemma \ref{algebra-lemma-make-valuation-rings}). In other words, $A' \to A'_1$ is a local ring map of valuation rings. Assumption (3) implies $$ \xymatrix{ \Spec(A'_1) \ar[r] \ar[d] & \Spec(C_1) \ar[r] & X \\ \Spec(A') \ar[r] & \Spec(P) \ar[r] & \Spec(B) \ar[u] } $$ commutes. Hence the restriction of the morphism $\Spec(C_1) \to X$ to $\Spec(C_1/\mathfrak p)$ restricts to the composition $$ \Spec(\kappa(\mathfrak p)) \to \Spec(A'/\mathfrak m_{A'}) = \Spec(K'') \to \Spec(K) \to X $$ on the generic point of $\Spec(C_1/\mathfrak p)$. Moreover, $C_1/\mathfrak p$ is a valuation ring (Algebra, Lemma \ref{algebra-lemma-make-valuation-rings}) dominating $A''$ which dominates $A$. Thus the morphism $\Spec(C_1/\mathfrak p) \to X$ witnesses the existence part of the valuative criterion for the diagram (\ref{equation-start-with}) as desired. \medskip\noindent Next, suppose that (5) is satisfied as well, i.e., the morphism $\Delta : X \to X \times_S X$ is quasi-compact. In this case assumptions (1) -- (4) hold for $h$ and $\Delta$. Hence the first part of the proof shows that $\Delta$ is universally closed. By Lemma \ref{lemma-separated-diagonal-proper} we conclude that $f$ is separated.