The margay (Leopardus wiedii) is a small Neotropical arboreal wild cat. This species is thought to be forest-dependent, although few studies so far have directly evaluated the relationships between spatiotemporal aspects of its ecology and landscape characteristics. The aim of this study was to estimate margay population density and activity patterns in six areas with different habitat types and levels of anthropogenic disturbance in the southernmost Atlantic Forest of Brazil. Our working hypothesis was that density and activity patterns differed between areas in response to differences in forest cover and anthropogenic disturbance. Margay records were obtained using camera trapping, during spring and summer from 2017 to 2019. In all areas, the sampling scheme consisted of 20 un-baited stations, set 1km apart, each containing two paired cameras. We assessed the potential effects of environmental variables, including anthropogenic factors, on margay density, rate of detection and space use by comparing nine spatial capture-recapture (SCR) models. Activity patterns of the margay, its potential prey, and competitors were described and compared using the date and time of the records. We obtained 66 records of margay. Two of the six sampled areas were excluded from subsequent analyses due to the small number of records. The density estimated by the top-ranked model varied from 9.6±6.4 individuals/100km 2 in the area with the highest human disturbance to 37.4±15.1 individuals/100km 2 in a less disturbed area. Margay densities responded positively to vegetation cover, supporting the hypothesis of forest dependence by the species. Both the margay and their potential prey (small rodents and marsupials) were found to be mostly nocturnal. Margay activity also overlapped with that of the ocelot, Leopardus pardalis, and with mammals associated with human