||Although large and medium-sized herbivorous mammals avoid urbanized areas, they have recently begun to colonize towns and cities. In general, ungulates continue to avoid the centres of urban areas, and utilize mainly their thinly built-up outskirts. While extension of urban development is preventing ungulates from penetrating the urban landscape, the influence of noise and light pollution on the occurrence of mammalian herbivores is still poorly understood. Hence, we investigated the hypothesis that habitat availability shapes the distribution of roe deer Capreolus capreolus and artificial lightening discourages them from penetrating the urban landscape. Roe deer was recorded on 37% of randomly selected sample plots (N = 60) located within the city of Kraków (S Poland). The occupied plots contained significantly more open habitats, woodland patches were larger in them, but proximity to rivers, and noise and light pollution were significantly lower. The logistic regression model revealed that an increasing area of open habitats was positively correlated with the probability of roe deer occurring. However, the artificial lighting at night was negatively correlated with the probability of the species occurring: the negative effect of light pollution was mitigated by the greater area of open habitats. Our study highlights the very considerable potential of light pollution as a predictor of the occurrence of large mammals in the urban landscape. We argue that urbanization and the related artificial lighting at night may be a factor preventing ungulates from penetrating potentially suitable habitats in urban areas.