Small, isolated populations of cold-adapted species at the edge of their climatic range are highly sensitive to environmental change, making them powerful ecological indicators. Cetraria sepincola (Ehrh.) Ach. is an epiphytic lichen which illustrates this role. It is common in Nordic countries, but in the southern parts of its European range, its distribution has become fragmented and restricted to cold habitats. We studied populations in habitats of high conservation value such as wetlands, montane stone fields, and wooded meadows in south-west Germany, where it persists at the edge of its ecological range in Central Europe and is becoming increasingly rare. Its dependence on specific climatic conditions and selectivity in its photobiont associations make it particularly responsive to shifts in climate and land use. Through historical records, recent observations, data on nitrogen deposition and associated species, we identified key environmental factors shaping the distribution of C. sepincola. Our analysis confirms that populations in south-west Germany occur at the climatic margin of the species’ Central European range. We also found that high-density local populations are linked to low ammonia (NH3) concentrations. Cetraria sepincola associated specifically with Trebouxia lineages from clade S (e.g. OTU S28 = Trebouxia barrenoae and OTU S27), commonly found in lichens from acidic substrates. We found the same Trebouxia lineages in the co-occurring acidophyte Hypogymnia physodes (L.) Nyl., a likely local photobiont donor for C. sepincola, which lacks asexual propagules. At some sites, species of the nitrophytic Xanthorion community started to colonize the same twigs as C. sepincola. In our study area, typically more nitrophytic species from the families Teloschistaceae (e.g. Polycauliona polycarpa (Hoffm.) Frödén et al., Xanthoria parietina (L.) Th. Fr.) and Physciaceae (Physcia adscendens H. Olivier) host Trebouxia algae from clades which are incompatible with C. sepincola. The spread of nitrophytic species and their associated photobionts into formerly acidophytic communities could also reduce the likelihood of finding compatible photobionts for C. sepincola. Climate change, possible direct toxic effects of NH3 on the mycobiont, and indirect impact of NH3 on the lichen and photobiont community exacerbate the extinction risk for sensitive lichens, particularly at the edge of their distribution range.