A combination of biophysical measurements and computer simulation shows that a localised increase in cell bond tension prevents cell mixing at the anterior-posterior compartment boundary of Drosophila wing imaginal discs.