We studied the among- and within-genus variability of UV protection in 23 mosses belonging to the genera Andreaea, Grimmia and Racomitrium, which were collected from sun-exposed rocks in northern and central Portugal mountains. We explored the influence of genus, species and environmental factors on their UV-absorption capacity, differentiating the soluble UV-absorbing compounds (SUVAC, mainly located in the vacuoles) and the insoluble ones (WUVAC, bound to the cell wall). All the physiological variables were significantly affected by both the genus and the species, which clearly reflects the influence of genetics on the levels and compartmentation of UV-absorbing compounds (UVAC). The physiological variables analyzed were also significantly influenced by both micro- (for example, substrate and orientation) and macro-scale (chain of mountains) variables. In addition, this study showed the interaction between genetics and the environmental factors known to enhance UV exposure (for example, higher altitudes and lower latitudes and slopes) on the level and compartmentation of UV-absorbing compounds.