Predation is one of the strongest selection pressures, forcing prey organisms to detect predators and to display various antipredator behaviours, such as refuge-use or decreased activity. To recognise predators, chemosensory cues play a pivotal role, particularly in aquatic ecosystems. However, it is less known whether the ability to use these cues to respond with adequate antipredator behaviour varies between individuals occupying different habitats that are dissimilar in predation risk. Using field experiments, we examined antipredator behaviour of larval fire salamanders (Salamandra salamandra) from two different habitats, ponds and streams. Among other differences, ponds and streams are inhabited by habitat-specific predators, such as alpine newts (Ichthyosaura alpestris) occurring in ponds. We exposed larvae from both habitats to either chemical cues from alpine newts or a blank control (tap water) and investigated potential differences in their behavioural responses in two experiments. Pond larvae, but not stream larvae, became significantly less active when faced with chemical cues from newts compared to those faced with a control stimulus. Moreover, larvae from both habitats tested in water containing chemical cues spent significantly less time outside a shelter than those in control water. Our results demonstrate that larval fire salamanders recognise predatory newts through kairomones and alter their behaviour accordingly. However, experience with predatory newts may not be necessary to differentiate kairomones from control water, but may be beneficial for larvae to further develop their antipredator behaviour, thus representing conformance to a niche.