Analyses are reported of the prescribing quality and behaviour of 131 doctors' practices in a South Wales health authority during the first quarter of 1997. Prescribing of specific groups of drugs are examined, namely antidepressants; bronchodilators and inhaled corticosteroids for treating asthma; and oral antidiabetics and insulin for diabetes. It is hypothesised that the volumes and costs of prescriptions are determined by the characteristics of both doctors/practices (number and age of doctors; training and fundholding status of practices; single-handed practices and doctors per patient) and their patients (age; gender; ethnicity; deprivation). The health authority's population is characterised by substantial inequalities in wealth and health. Statistical analyses reveal the consistent influence of deprivation on prescribing costs and volumes, with the exception of items of insulin. Supply factors exert more selective influences. Thus, the number of doctors per practice and per patient has a positive influence on antidepressant prescribing; fundholding status is associated with lower costs for bronchodilator prescribing; and older doctors tend to prescribe more bronchodilators and oral antidiabetics. Residuals from the statistical analyses suggest further systematic influences, notably advice from hospital consultants, as well as more localised and less consistent effects.