The eukaryotic genome is organized in the three-dimensional nuclear space in a specific manner that is both a cause and a consequence of its function. This organization is partly established by a special class of architectural proteins, of which CCCTC-binding factor (CTCF) is the best characterized. Although CTCF has been assigned various roles that are often contradictory, new results now help to draw a unifying model to explain the many functions of this protein. CTCF creates boundaries between topologically associating domains in chromosomes and, within these domains, facilitates interactions between transcription regulatory sequences. Thus, CTCF links the architecture of the genome to its function.