This study investigates the prevalence of spp. in tick populations in different forest habitat types (broadleaf forest, mixed broadleaf and coniferous forest, and coniferous forest) in south-western Poland. During the survey periods from April to June 2018 and 2019 a total of 494 ticks, including 374 nymphs, 60 females and 60 males, were tested for infections by nested PCR targeting the A gene. The overall infection rate was 42.3%; however, we observed statistically significant year-to-year variation. Infection rates varied between tick developmental stages and were significantly influenced by forest habitat type. As assessed by a generalized linear mixed model (GLMM), the highest infection rates were observed in mixed broadleaf and coniferous forests, while coniferous forests had a significant negative effect on infection prevalence. DNA sequencing of selected samples confirmed the predominance of (91.2%) and less frequent (8.8%). This study suggests that the forest habitat types can influence spp. infection in tick populations; however, a comprehensive understanding of all factors influencing the level of infection requires future study.