Objectives A considerable proportion of regional variation in healthcare use and health expenditures is to date still unexplained. The aim was to investigate regional differences in the gatekeeping role of general practitioners and to identify relevant explanatory variables at patient and district level in Bavaria, Germany. Design Retrospective routine data analysis using claims data held by the Bavarian Association of Statutory Health Insurance Physicians. Participants All patients who consulted a specialist in ambulatory practice within the first quarter of 2011 (n = 3 616 510). Outcomes measures Of primary interest is the effect of district-level measures of rurality, physician density and multiple deprivation on (1) the proportion of patients with general practitioner (GP) coordination of specialist care and (2) the mean amount in Euros claimed by specialist physicians. Results The proportion of patients whose use of specialist services was coordinated by a GP was significantly higher in rural areas and in highly deprived regions, as compared with urban and less deprived regions. The hierarchical models revealed that increasing age and the presence of chronic diseases are the strongest predictive factors for coordination by a GP. In contrast, the presence of mental illness, an increasing number of medical condition categories and living in a city are predictors for specialist use without GP coordination. The amount claimed per patient was (sic)10 to (sic)20 higher in urban districts and in regions with lower deprivation. Hierarchical models indicate that this amount is on average higher for patients living in towns and lower for patients in regions with high deprivation. Conclusion The present study shows that regional deprivation is closely associated with the way in which patients access primary and specialist care. This has clear consequences, both with respect to the role of the general practitioner and the financial costs of care.