INTRODUCTION: Prescribing errors are a major cause of patient safety incidents. Understanding the underlying factors is essential in developing interventions to address this problem. This study aimed to investigate the perceived causes of prescribing errors among foundation (junior) doctors in Scotland. METHODS: In eight Scottish hospitals, data on prescribing errors were collected by ward pharmacists over a 14-month period. Foundation doctors responsible for making a prescribing error were interviewed about the perceived causes. Interview transcripts were analysed using content analysis and categorised into themes previously identified under Reason's Model of Accident Causation and Human Error. RESULTS: 40 prescribers were interviewed about 100 specific errors. Multiple perceived causes for all types of error were identified and were categorised into five categories of error-producing conditions, (environment, team, individual, task and patient factors). Work environment was identified as an important aspect by all doctors, especially workload and time pressures. Team factors included multiple individuals and teams involved with a patient, poor communication, poor medicines reconciliation and documentation and following incorrect instructions from other members of the team. A further team factor was the assumption that another member of the team would identify any errors made. The most frequently noted individual factors were lack of personal knowledge and experience. The main task factor identified was poor availability of drug information at admission and the most frequently stated patient factor was complexity. CONCLUSIONS: This study has emphasised the complex nature of prescribing errors, and the wide range of error-producing conditions within hospitals including the work environment, team, task, individual and patient. Further work is now needed to develop and assess interventions that address these possible causes in order to reduce prescribing error rates.