Habitat urbanization may change the density of predators, and it is often assumed that such changes lead to altered predation risk for urban populations of their prey. Although it is difficult to study predation hazard directly, behavior responses of prey species may be informative in inferring such habitat differences. In this study, we compared the risk-taking behavior of urban and rural house sparrows (Passer domesticus) after simulated attacks by two of their important predators (sparrowhawk Accipiter nisus and domestic cat Felis catus). The birds were startled by moving dummies of these predators and respective control objects, and their risk taking was estimated as their latency to feed after the startle. We found that sparrows responded more strongly (had longer post-startle feeding latencies) to sparrowhawk attacks than to the control object, and their responses differed between the habitats. First, risk taking of urban birds strongly decreased with age (older birds had longer latencies than young birds), while there was no such age difference in rural birds. Second, young urban birds responded less strongly, while older urban birds responded more strongly to the sparrowhawk than the same age groups of rural birds, respectively. We did not succeed in evoking antipredatory response by simulated cat attacks, because birds responded similarly to the dummy and the control object. Our results support that predation risk, posed at least by avian predators, is different in urban and rural habitats of house sparrows. The increased wariness of older, hence presumably more experienced, urban birds implies that sparrows may be more exposed to predation in cities.