BACKGROUND: While much research has been conducted on medication safety, few of these studies have addressed primary care, despite the high volume of prescribing and dispensing of medicines that occurs in this setting. Those studies that have examined primary care dispensing emphasised the need to understand the role of sociotechnical factors (that is, the interactions between people, tasks, equipment and organisational structures) in promoting or preventing medication incidents. The aim of this study was to identify sociotechnical factors that community pharmacy staff encounter in practice, and suggest how these factors might impact on medication safety. METHODS: Sixty-seven practitioners, working in the North West of England, took part in ten focus groups on risk management in community pharmacy. The data obtained from these groups was subjected to a qualitative analysis to identify recurrent themes pertaining to sociotechnical aspects of medication safety. RESULTS: The findings indicated several characteristics of participants' work settings that were potentially related to medication safety. These were broadly classified as relationships involving the pharmacist, demands on the pharmacist and management and governance of pharmacists. CONCLUSION: It is recommended that the issues raised in this study be considered in future work examining medication safety in primary care.