The formation of boundaries between or within tissues is a fundamental aspect of animal development. In the developing vertebrate hindbrain, boundaries separate molecularly and neuroanatomically distinct segments called rhombomeres. Transplantation studies have suggested that rhombomere boundaries form by the local sorting out of cells with different segmental identities. This sorting-out process has been shown to involve repulsive interactions between cells expressing an Eph receptor tyrosine kinase, EphA4, and cells expressing its ephrinB ligands. Although a model for rhombomere-boundary formation based on repulsive Eph-ephrin signaling is well established in the literature, the predictions of this model have not been tested in loss-of-function experiments. Here, we eliminate EphA4 and ephrinB2a proteins in zebrafish with antisense morpholinos (MO) and find that rhombomere boundaries are disrupted in EphA4MO embryos, consistent with a requirement for Eph-ephrin signaling in boundary formation. However, in mosaic embryos, we observe that EphA4MO cells and EphA4-expressing cells sort from one another, an observation that is not predicted by the Eph-ephrin repulsion model but instead suggests that EphA4 promotes cell adhesion within the rhombomeres in which it is expressed. Differential cell adhesion is known to be an effective mechanism for cell sorting. We therefore propose that the well-known EphA4-dependent repulsion between rhombomeres operates in parallel with the EphA4-dependent adhesion within rhombomeres described here to drive the cell sorting that underlies rhombomere-boundary formation.