Wild animals living in proximity to humans may benefit from recognizing people individually and adjusting their behaviour to the potential risk or gain expected from each person. Although several urban-dwelling species exhibit such skills, it is unclear whether this is due to pre-existing advanced cognitive abilities of taxa predisposed for city life or arises specifically in urban populations either by selection or through ontogenetic changes facilitated by exposure to humans. To test these alternatives, we studied populations of house sparrows (Passer domesticus) along the urbanization gradient. We manipulated the birds' experience (hostile or not) associated with humans with different faces (masks) and measured their behavioural responses to the proximity of each person. Contrary to our expectations, we found that while rural birds showed less fear of the non-hostile than of the hostile or an unfamiliar person, urban birds made no distinction. These results indicate that house sparrows are less able to recognize individual humans or less willing to behaviourally respond to them in more urbanized habitats with high human population density. We propose several mechanisms that may explain this difference, including reduced pay-off of discrimination due to a low chance of repeated interactions with city people, or a higher likelihood that city people will ignore them.