Basking and retreat sites constitute a key resource in the habitat of any ectotherm. Identifying the elements that are used and modelling the microhabitat selection of species is crucial for assessing the impact of anthropogenic disturbances at the population level and, therefore, focusing on conservation efforts. We investigated how structural attributes of the microhabitat and biotic factors influence the probability of basking and retreat sites use by Phymaturus palluma, a rock-dwelling and viviparous lizard endemic to the Central Andes of Argentina. We measured the characteristics of a series of rocks (basking sites) and shelters (retreat sites) in the study area and compared lizard resource use versus availability using resource selection analyses (RSFs). According to our best RSF model, P. palluma select high and large rocks as basking sites and prefer those near their retreat sites and far from the basking sites of their neighbours. In contrast, retreat site selection is related to the length, depth, slope, and width of the shelter. Microhabitat site selection of P. palluma is associated with behavioural improvements such as enhancing basking capacity, reducing both intraspecific competition with neighbours and predation risk.