The organizing centers for Drosophila imaginal disc development are created at straight boundaries between compartments; these are maintained by differences in cell affinity controlled by selector genes and intercellular signals. skuld and kohtalo encode homologs of TRAP240 and TRAP230, the two largest subunits of the Drosophila mediator complex; mutations in either gene cause identical phenotypes. We show here that both genes are required to establish normal cell affinity differences at the anterior-posterior and dorsal-ventral compartment boundaries of the wing disc. Mutant cells cross from the anterior to the posterior compartment, and can distort the dorsal-ventral boundary in either the dorsal or ventral direction. The Skuld and Kohtalo proteins physically interact in vivo and have synergistic effects when overexpressed, consistent with a skuld kohtalo double-mutant phenotype that is indistinguishable from either single mutant. We suggest that these two subunits do not participate in all of the activities of the mediator complex, but form a submodule that is required to regulate specific target genes, including those that control cell affinity.