We choose a set $I$\footnote{The reader who is still keeping track of set theoretic issues should make sure $I$ is not too large.} and for $i \in I$ a morphism of algebraic stacks $g_i : \mathcal{X}_i \to \mathcal{X}$ as in Lemma \ref{lemma-etale-local-finite-inertia}; we will use all of the properties listed in this lemma without further mention. Let $$ f_i : \mathcal{X}_i \to M_i $$ be as in Lemma \ref{lemma-well-nigh-affine-moduli-space}. Consider the stacks $$ \mathcal{X}_{ij} = \mathcal{X}_i \times_{g_i, \mathcal{X}, g_j} \mathcal{X}_j $$ for $i, j \in I$. The projections $\mathcal{X}_{ij} \to \mathcal{X}_i$ and $\mathcal{X}_{ij} \to \mathcal{X}_j$ are separated by Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-base-change-separated}, \'etale by Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-base-change-etale}, and induce isomorphisms on automorphism groups (as in Morphisms of Stacks, Remark \ref{stacks-morphisms-remark-identify-automorphism-groups}) by Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-base-change-stabilizer-preserving}. Thus we may apply Lemma \ref{lemma-etale-separated-over-well-nigh-affine} to find a commutative diagram $$ \xymatrix{ \mathcal{X}_i \ar[d]_{f_i} & \mathcal{X}_{ij} \ar[d]_{f_{ij}} \ar[l] \ar[r] & \mathcal{X}_j \ar[d]_{f_j} \\ M_i & M_{ij} \ar[l] \ar[r] & M_j } $$ with cartesian squares where $M_{ij} \to M_i$ and $M_{ij} \to M_j$ are separated \'etale morphisms of schemes; here we also use that $f_i$ is a uniform categorical quotient by Lemma \ref{lemma-moduli-space-finite-affine}. Claim: $$ \coprod M_{ij} \longrightarrow \coprod M_i \times \coprod M_i $$ is an \'etale equivalence relation. \medskip\noindent Proof of the claim. Set $R = \coprod M_{ij}$ and $U = \coprod M_i$. We have already seen that $t : R \to U$ and $s : R \to U$ are \'etale. Let us construct a morphism $c : R \times_{s, U, t} R \to R$ compatible with $\text{pr}_{13} : U \times U \times U \to U \times U$. Namely, for $i, j, k \in I$ we consider $$ \mathcal{X}_{ijk} = \mathcal{X}_i \times_{g_i, \mathcal{X}, g_j} \mathcal{X}_j \times_{g_j, \mathcal{X}, g_k} \mathcal{X}_k = \mathcal{X}_{ij} \times_{\mathcal{X}_j} \mathcal{X}_{jk} $$ Arguing exactly as in the previous paragraph, we find that $M_{ijk} = M_{ij} \times_{M_j} M_{jk}$ is a categorical moduli space for $\mathcal{X}_{ijk}$. In particular, there is a canonical morphism $M_{ijk} = M_{ij} \times_{M_j} M_{jk} \to M_{ik}$ coming from the projection $\mathcal{X}_{ijk} \to \mathcal{X}_{ik}$. Putting these morphisms together we obtain the morphism $c$. In a similar fashion we construct a morphism $e : U \to R$ compatible with $\Delta : U \to U \times U$ and $i : R \to R$ compatible with the flip $U \times U \to U \times U$. Let $k$ be an algebraically closed field. Then $$ \Mor(\Spec(k), \mathcal{X}_i) \to \Mor(\Spec(k), M_i) = M_i(k) $$ is bijective on isomorphism classes and the same remains true after any base change by a morphism $M' \to M$. This follows from our choice of $f_i$ and Morphisms of Stacks, Lemmas \ref{stacks-morphisms-lemma-universally-injective} and \ref{stacks-morphisms-lemma-universally-injective-point}. By construction of $2$-fibred products the diagram $$ \xymatrix{ \Mor(\Spec(k), \mathcal{X}_{ij}) \ar[d] \ar[r] & \Mor(\Spec(k), \mathcal{X}_j) \ar[d] \\ \Mor(\Spec(k), \mathcal{X}_i) \ar[r] & \Mor(\Spec(k), \mathcal{X}) } $$ is a fibre product of categories. By our choice of $g_i$ the functors in this diagram induce bijections on automorphism groups. It follows that this diagram induces a fibre product diagram on sets of isomorphism classes! Thus we see that $$ R(k) = U(k) \times_{|\Mor(\Spec(k), \mathcal{X})|} U(k) $$ where $|\Mor(\Spec(k), \mathcal{X})|$ denotes the set of isomorphism classes. In particular, for any algebraically closed field $k$ the map on $k$-valued point is an equivalence relation. We conclude the claim holds by Groupoids, Lemma \ref{groupoids-lemma-etale-equivalence-relation}. \medskip\noindent Let $M = U/R$ be the algebraic space which is the quotient of the above \'etale equivalence relation, see Spaces, Theorem \ref{spaces-theorem-presentation}. There is a canonical morphism $f : \mathcal{X} \to M$ fitting into commutative diagrams \begin{equation} \label{equation-fundamental-diagram} \xymatrix{ \mathcal{X}_i \ar[r]_{g_i} \ar[d]_{f_i} & \mathcal{X} \ar[d]^f \\ M_i \ar[r] & M } \end{equation} Namely, such a morphism $f$ is given by a functor $$ f : \Mor(T, \mathcal{X}) \longrightarrow \Mor(T, M) $$ for any scheme $T$ compatible with base change. Let $a : T \to \mathcal{X}$ be an object of the left hand side. We obtain an \'etale covering $\{T_i \to T\}$ with $T_i = \mathcal{X}_i \times_\mathcal{X} T$ and morphisms $a_i : T_i \to \mathcal{X}_i$. Then we get $b_i = f_i \circ a_i : T_i \to M_i$. Since $T_i \times_T T_j = \mathcal{X}_{ij} \times_\mathcal{X} T$ we moreover get a morphism $a_{ij} : T_i \times_T T_j \to \mathcal{X}_{ij}$. Setting $b_{ij} = f_{ij} \circ a_{ij}$ we find that $b_i \times b_j$ factors through the monomorphism $M_{ij} \to M_i \times M_j$. Hence the morphisms $$ T_i \xrightarrow{b_i} M_i \to M $$ agree on $T_i \times_T T_j$. As $M$ is a sheaf for the \'etale topology, we see that these morphisms glue to a unique morphism $b = f(a) : T \to M$. We omit the verification that this construction is compatible with base change and we omit the verification that the diagrams (\ref{equation-fundamental-diagram}) commute. \medskip\noindent Claim: the diagrams (\ref{equation-fundamental-diagram}) are cartesian. To see this we study the induced morphism $$ h_i : \mathcal{X}_i \longrightarrow M_i \times_M \mathcal{X} $$ This is a morphism of stacks \'etale over $\mathcal{X}$ and hence $h_i$ is \'etale (Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-etale-permanence}). Since $g_i$ is separated, we see $h_i$ is separated (use Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-compose-after-separated} and the fact seen above that the diagonal of $\mathcal{X}$ is separated). The morphism $h_i$ induces isomorphisms on automorphism groups (Morphisms of Stacks, Remark \ref{stacks-morphisms-remark-identify-automorphism-groups}) as this is true for $g_i$. For an algebraically closed field $k$ the diagram $$ \xymatrix{ \Mor(\Spec(k), M_i \times_M \mathcal{X}) \ar[r] \ar[d] & \Mor(\Spec(k), \mathcal{X}) \ar[d] \\ M_i(k) \ar[r] & M(k) } $$ is a catesian diagram of categories and the top arrow induces bijections on automorphism groups. On the other hand, we have $$ M(k) = U(k)/R(k) = U(k)/ U(k) \times_{|\Mor(\Spec(k), \mathcal{X})|} U(k) = |\Mor(\Spec(k), \mathcal{X})| $$ by what we said above. Thus the right vertical arrow in the cartesian diagram above is a bijection on isomorphism classes. We conclude that $|\Mor(\Spec(k), M_i \times_M \mathcal{X})| \to M_i(k)$ is bijective. Review: $h_i$ is a separated, \'etale, induces isomorphisms on automorphism groups (as in Morphisms of Stacks, Remark \ref{stacks-morphisms-remark-identify-automorphism-groups}), and induces an equivalence on fibre categories over algebraically closed fields. Hence it is an isomorphism by Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-etale-iso}. \medskip\noindent From the claim we get in particular the following: we have a surjective \'etale morphism $U \to M$ such that the base change of $f$ is separated, quasi-compact, and a universal homeomorphism. It follows that $f$ is separated, quasi-compact, and a universal homeomorphism. See Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-check-separated-covering}, \ref{stacks-morphisms-lemma-check-quasi-compact-covering}, and \ref{stacks-morphisms-lemma-check-universal-homeomorphism-covering} \medskip\noindent To finish the proof we have to show that $f : \mathcal{X} \to M$ is a uniform categorical moduli space. To prove this it suffices to show that given a flat morphism $M' \to M$ of algebraic spaces, the base change $$ M' \times_M \mathcal{X} \longrightarrow M' $$ is a categorical moduli space. Thus we consider a morphism $$ \theta : M' \times_M \mathcal{X} \longrightarrow E $$ where $E$ is an algebraic space. For each $i$ we know that $f_i$ is a uniform categorical moduli space. Hence we obtain $$ \xymatrix{ M' \times_M \mathcal{X}_i \ar[d] \ar[r] & M' \times_M \mathcal{X} \ar[d]^\theta \\ M' \times_M M_i \ar[r]^{\psi_i} & E } $$ Since $\{M' \times_M M_i \to M'\}$ is an \'etale covering, to obtain the desired morphism $\psi : M' \to E$ it suffices to show that $\psi_i$ and $\psi_j$ agree over $M' \times_M M_i \times_M M_j = M' \times_M M_{ij}$. This follows easily from the fact that $f_{ij} : \mathcal{X}_{ij} = \mathcal{X}_i \times_\mathcal{X} \mathcal{X}_j \to M_{ij}$ is a uniform categorical quotient; details omitted. Then finally one shows that $\psi$ fits into the commutative diagram $$ \xymatrix{ M' \times_M \mathcal{X} \ar[d] \ar[rd]^\theta \\ M' \ar[r]^\psi & E } $$ because ``$\{M' \times_M \mathcal{X}_i \to M' \times_M \mathcal{X}\}$ is an \'etale covering'' and the morphisms $\psi_i$ fit into the corresponding commutative diagrams by construction. This finishes the proof of the Keel-Mori theorem.