Let $R$ be a dvr and $f : X\to S$ a universally closed morphism of $R$-schemes. Assume $X$ and $S$ are $R$-flat and universally closed.

If the special fiber of $X\to S$ is a closed immersion, is $X\to S$ a closed immersion?

**remarks**

My guess is "no", but I'm looking for a counterexample (I can imagine something where $f$ crashes a locus contained in the generic fiber to a point).

Namely, I expect "no" for an answer because I see no reason why $f$ should have to be a monomorphism (unless one also assumes $f$ is a closed immersion on generic fibers, which I am not assuming). I'd expect some example such that for some $s\in S$ the fiber $f^{-1}(s)$ is nonempty and larger than $\kappa(s)$-point.

I can believe $f$ is unramified. What I expect should fail is the monomorphism part.

A silly example of a map that is a monomorphism on special fibers but not globally a monomorphism can already be, calling $K$ the fraction field of $R$ $$f : \text{Spec}(K)\coprod \text{Spec}(R) \to\text{Spec}(R)$$ induced by the ring map $R\to R\times K$, the identity on the first factor and the inclusion on the second. Clearly $f$ is the identity (hence a closed immersion) on special fibers, but it is not a monomorphism globally since the fiber over the generic point $\eta\in\text{Spec}(R)$ is two copies of $\eta$ and not one.

**What I'm looking for**is a neat non-silly example of a geometric flavor (say $X$ and $S$ connected, of dimension $\ge 2$, perhaps $f$ of relative dimension $\ge 1$ with geometrically connected fibers). In the first example above $\text{Spec}(K)\coprod\text{Spec}(R)$ is not universally closed, so this is not an example directly relevant to the question. The second example above, if correct, should answer the question in the negative, as expected. I'd prefer some example for which one can (at least generically) "draw a picture".

3more comments