SUMMARYSong geographic variation and Neighbour-Stranger (N-S) discrimination have been intensively but separately studied in bird species, especially in those with small-to medium-sized repertoires. Here, we establish a link between the two phenomena by showing that dialect features are used for N-S recognition in a territorial species with a large repertoire, the skylark Alauda arvensis. In this species, during the breeding season, many pairs settle in stable and adjoining territories gathered in locations spaced by a few kilometres. In a first step, songs produced by males established in different locations were recorded, analyzed and compared to identify possible microgeographic variation at the syntax level. Particular common sequences of syllables (phrases) were found in the songs of all males established in the same location (neighbours), whereas males of different locations (strangers) shared only few syllables and no sequences. In a second step, playback experiments were conducted and provided evidence for N-S discrimination consistent with the dear-enemy effect, i.e. reduced aggression from territorial birds towards neighbours than towards strangers. In addition, a similar response was observed when a ʻchimericʼ signal (shared phrases of the location artificially inserted in the song of a stranger) and a neighbour song were broadcast, indicating that shared sequences were recognized and identified as markers of the group identity. We thus show experimentally that the shared phrases found in the songs of neighbouring birds constitute a group signature used by birds for N-S discrimination, and serve as a basis for the dear-enemy effect.