Background: The place of opioids in the management of chronic, non-cancer pain is limited. Even so their use is escalating, leading to concerns that patients are prescribed strong opioids inappropriately and alternatives to medication are under-used. We aimed to understand the processes which bring about and perpetuate long-term prescribing of opioids for chronic, non-cancer pain. Methods: We held semi-structured interviews with patients and focus groups with general practitioners (GPs). Participants included 23 patients currently prescribed long-term opioids and 15 GPs from Leeds and Bradford, United Kingdom (UK). We used a grounded approach to the analysis of transcripts. Results: Patients are driven by the needs for pain relief, explanation, and improvement or maintenance of quality of life. GPs' responses are shaped by how UK general practice is organised, available therapeutic choices and their expertise in managing chronic pain, especially when facing diagnostic uncertainty or when their own approach is at odds with the patient's wishes. Four features of the resulting transaction between patients and doctors influence prescribing: lack of clarity of strategy, including the risk of any plans being subverted by urgent demands; lack of certainty about locus of control in decision-making, especially in relation to prescribing; continuity in the doctor-patient relationship; and mutuality and trust. Conclusions: Problematic prescribing occurs when patients experience repeated consultations that do not meet their needs and GPs feel unable to negotiate alternative approaches to treatment. Therapeutic short-termism is perpetuated by inconsistent clinical encounters and the absence of mutually-agreed formulations of underlying problems and plans of action. Apart from commissioning improved access to appropriate specialist services, general practices should also consider how they manage problematic opioid prescribing and be prepared to set boundaries with patients.