BackgroundCases of Lyme borreliosis, a vector-borne zoonosis caused by bacteria in the Borrelia burgdorferi (sensu lato) species group, have increased in recent years in Europe. Knowledge of environmental factors associated with abundance of the tick vector Ixodes ricinus and the pathogen B. burgdorferi (s.l.) is of interest to understand responses to environmental changes, predict variation in risk and to inform management interventions.MethodsNineteen woodland sites across Scotland were surveyed in 2012 for B. burgdorferi (s.l.) infection in questing I. ricinus nymphs (n = 200 per site), deer abundance and vegetation. Climatic factors were extracted for each site. Six additional sites were surveyed for questing nymphs in both 2012 and 2013 (n = 200 per site and year) to test for variation in B. burgdorferi (s.l.) prevalence between years.ResultsThe mean prevalence of B. burgdorferi (s.l.) across 19 sites was 1.7% (95% CI: 1.4–2.2%; range 0–6%), all four genospecies known to be present in the UK were detected: B. garinii, B. afzelii, B. burgdorferi (sensu stricto) and B. valaisiana. A higher prevalence of B. burgdorferi (s.l.), higher densities of nymphs and higher densities of infected nymphs were found at sites with warmer climates, estimated with growing degree-days. No association between infection prevalence in nymphs and woodland type (semi-natural mixed vs coniferous) or deer density was found. At six sites sampled in 2012 and 2013, there was a significant increase in B. afzelli prevalence at two sites and a decrease in B. garinii prevalence at one site.ConclusionsThis study highlights challenges for the prediction of risk of Lyme borreliosis, reflecting the sensitivity of both pathogen and vector ecology to habitat, host and climatic factors. Significant changes in the prevalence of individual genospecies at sites monitored across time are likely to be due to variability in the host community composition between years. Our results indicate the importance of monitoring dynamic variables such as reservoir host populations as well as climate and habitat factors over multiple years, to identify environmental factors associated with Lyme borreliosis risk.Electronic supplementary materialThe online version of this article (doi:10.1186/s13071-016-1875-9) contains supplementary material, which is available to authorized users.