A prospective, randomised, blinded, clinical trial in 47 ponies compared butorphanol and buprenorphine administered intravenously with detomidine prior to castration under anaesthesia. Detomidine 12 μg/kg intravenously was followed by butorphanol 25 μg/kg (BUT) or buprenorphine 5 μg/kg (BUP) before induction of anaesthesia with intravenous ketamine and diazepam. Quality of sedation, induction and recovery from anaesthesia, response to tactile stimulation, and surgical conditions were scored. If anaesthesia was inadequate 'rescue' was given with intravenous ketamine (maximum three doses) followed by intravenous thiopental and detomidine. Time from induction to first rescue, total ketamine dose and number of rescues were recorded. Postoperative locomotor activity was scored and abnormal behaviour noted. Simple descriptive scales were used for all scoring. Data were analysed using two-way analysis of variance, t tests, Mann-Whitney or Fisher's exact tests as appropriate; P<0.05 was considered statistically significant. Cryptorchid animals did not undergo surgery, but castration was successfully completed in 18 BUT and 20 BUP. More incremental ketamine (P=0.0310) and more rescue drugs (P=0.0165) were required in BUT and more postoperative locomotor activity occurred in BUP (P=0.0001). There were no other differences between groups. Both opioids were suitable for premedication prior to castration but buprenorphine appeared to provide better intraoperative analgesia.