Lemma 38.11.4. Let $f : X \to S$ be a morphism of schemes which is flat and proper. Let $U \subset S$ be a dense open such that $X_ U \to U$ is finite. If also either $f$ is locally of finite presentation or $U \subset S$ is retrocompact, then $f$ is finite.

Proof. By Lemma 38.11.3 the fibres of $f$ have dimension zero. Hence $f$ is quasi-finite (Morphisms, Lemma 29.29.5) whence has finite fibres (Morphisms, Lemma 29.20.10). Hence $f$ is finite by More on Morphisms, Lemma 37.44.1. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).