The initial differential treatment of the two X chromosomes during X-chromosome inactivation is controlled by the X-inactivation centre (Xic). This locus determines how many X chromosomes are present in a cell ('counting') and which X chromosome will be inactivated in female cells ('choice'). Critical control sequences in the Xic include the non-coding RNAs Xist and Tsix, and long-range chromatin elements. However, little is known about the process that ensures that X inactivation is triggered appropriately when more than one Xic is present in a cell. Using three-dimensional fluorescence in situ hybridization (FISH) analysis, we showed that the two Xics transiently colocalize, just before X inactivation, in differentiating female embryonic stem cells. Using Xic transgenes capable of imprinted but not random X inactivation, and Xic deletions that disrupt random X inactivation, we demonstrated that Xic colocalization is linked to Xic function in random X inactivation. Both long-range sequences and the Tsix element, which generates the antisense transcript to Xist, are required for the transient interaction of Xics. We propose that transient colocalization of Xics may be necessary for a cell to determine Xic number and to ensure the correct initiation of X inactivation.