Hair cells in the inner ear display a characteristic polarization of their apical stereocilia across the plane of the sensory epithelium. This planar orientation allows coherent transduction of mechanical stimuli because the axis of morphological polarity of the stereocilia corresponds to the direction of excitability of the hair cells. Neuromasts of the lateral line in fishes and amphibians form two intermingled populations of hair cells oriented at 180 degrees relative to each other, however, creating a stimulus-polarity ambiguity. Therefore, it is unknown how these animals resolve the vectorial component of a mechanical stimulus. Using genetic mosaics and live imaging in transgenic zebrafish to visualize hair cells and neurons at single-cell resolution, we show that lateral-line afferents can recognize the planar polarization of hair cells. Each neuron forms synapses with hair cells of identical orientation to divide the neuromast into functional planar-polarity compartments. We also show that afferent neurons are strict selectors of polarity that can re-establish synapses with identically oriented targets during hair-cell regeneration. Our results provide the anatomical bases for the physiological models of signal-polarity resolution by the lateral line.