Acoustic Neighbour‐Stranger (N‐S) discrimination is widespread in birds and has evolved to settle territorial disputes with low costs. N‐S discrimination was found both in song‐learning oscines and non‐song‐learning bird taxa, irrespective of the repertoire sizes they have. Therefore, it seems that more than just a single mechanism enable N‐S discrimination. Species with larger repertoires, where males have unique phrases or syllables may rely on such interindividual differences. The majority of birds have rather small repertoires, which often are shared among neighbours. In this case, males are facing the problem of individual recognition when rivals produce songs, at least superficially, identical. To better understand the acoustic basis of N‐S discrimination in species with small and shared repertoires, I studied the ortolan bunting (Emberiza hortulana). Males of this small oscine species are able to N‐S discrimination based on a single song rendition when presented in a playback experiment, regardless of song‐type diversity and song‐sharing level within a particular population. It was also found that songs of the same type sung by different males differ in the frequency of the initial song phrases and these differences persist over years. Here, I tested whether males are able to discriminate among the natural songs and the artificially modified songs of their neighbours in which the frequency was experimentally changed by relatively small value in comparison with the variation range found in this population. Subjects responded significantly more aggressively to the songs with an artificially modified frequency, suggesting that males treat such songs as having come from the repertoire of a non‐neighbour. These results confirm an earlier prediction that differences in the frequency of shared song types enable N‐S discrimination. The study presents one of the possible mechanisms enabling N‐S discrimination in songbirds with small repertoires and stress the role of within‐song‐type variation, which is still understudied song characteristic.