Let (T,M) be a complete local ring such that |T/M| = |T|. Given a finite set of incomparable nonmaximal prime ideals C of T , we provide necessary and sufficient conditions for T to be the completion of a local UFD A, whose generic formal fiber is semilocal with maximal ideals the elements of C. We also show that, given the T above, we can find necessary and sufficient conditions for T to be the completion of a UFD, whose formal fiber over a height one prime ideal is semilocal.