Factorization over a relatively minimal surface Let $A$ be a DVR with an algebraically closed residue field $k$. Consider a morphism $f: X \to Y$ of arithmetic surfaces (regular integer projective and flat schemes over $A$ of dimension 2), such that $f$ induces a finite morphism on generic fibers. Assume that $X$ and $Y$ are semistable, the generic fibers of $X$ and $Y$ are smooth, and $Y$ is relatively minimal, i.e. does not contain any exceptional divisor.

Q: Is there any chance that $f$ factors through a birational map $X \to X'$, where $X'$ is a relatively minimal surface?

As far I understand, the answer lies in the consideration of an irreducible component $C$ of the closed fiber $X_k$ of $X$, which is isomorphic to $\mathbb P^1_k$ and intersects the other components of $X_k$ in exactly one point. With respect to the morphism $X \to X'$ the component $C$ is then contracted. If $f$ contracts $C$, so $f$ can possibly factor through $X'$. But in general (it seems to me) it could happen, that $f(C)$ is irreducible and intersects the other components of $Y_k$ in at least two points.
 A: I'll generalize the set-up a bit. The answer to your question should be negative.
Let $S$ be a Dedekind scheme with function field $K$.
Let $\pi_K:X_K \to Y_K$ be a finite morphism of smooth projective geometrically connected curves over $K$. Let $Y$ be a (regular projective) model for $Y_K$ over $S$. Let $\pi:(Y,X_K)\to Y$ be the normalization of $Y$ in the function field of $X_K$. You are asking whether the minimal resolution of singularities of $N(Y,X_K)$ is relatively minimal. Let me first try to convince you this is what you are asking for.
Explanation. Your morphism $X\to Y$ factors as $X\to N(Y,X_K) \to Y$ with $X\to N(Y,X_K)$ birational projective surjective. Asking whether $X\to Y$ factors through a morphism $X\to X_m$, where $X_m$ is the minimal regular model of $X_K$ over $O_K$, is equivalent to asking whether the minimal resolution of singularities of $X^\prime\to X$ coincides with $X_m$. 
You can give examples of when this will not happen.  But, it could happen if you modify $Y$.
Let me just finish by mentioning three relevant references.
Besides Qing Liu's book, you could take a look at the article 
http://www.math.u-bordeaux1.fr/~qliu/articles/Compositio.pdf
Moreover, Liu-Lorenzini's article seems also relevant
http://www.math.u-bordeaux1.fr/~qliu/articles/modcove.pdf
