Background Many patients with advanced type 2 diabetes do not meet their glycated haemoglobin targets and randomised controlled studies comparing the efficacy of pump treatment and multiple daily injections for lowering glucose in insulin-treated patients have yielded inconclusive results. We aimed to resolve this uncertainty with a randomised controlled trial (OpT2mise). Methods We did this multicentre, controlled trial at 36 hospitals, tertiary care centres, and referal centres in Canada, Europe, Israel, South Africa, and the USA. Patients with type 2 diabetes who had poor glycaemic control despite multiple daily injections with insulin analogues were enrolled into a 2-month dose-optimisation run-in period. After the run-in period, patients with glycated haemoglobin of 8 0-12 0% (64-108 mmol/mol) were randomly assigned (1:1) by a computer-generated randomisation sequence (block size 2 with probability 0 75 and size 4 with probability 0 25) to pump treatment or to continue with multiple daily injections. Neither patients nor investigators were masked to treatment allocation. The primary endpoint was change in mean glycated haemoglobin between baseline and end of the randomised phase for the intention-to-treat population. This study is registered with ClinicalTrials.gov, number NCT01182493. Findings 495 of 590 screened patients entered the run-in phase and 331 were randomised (168 to pump treatment, 163 to multiple daily injections). Mean glycated haemoglobin at baseline was 9% (75 mmol/mol) in both groups. At 6 months, mean glycated haemoglobin had decreased by 1 1% (SD 1 2; 12 mmol/mol, SD 13) in the pump treatment group and 0 4% (SD 1 1; 4 mmol/mol, SD 12) in the multiple daily injection group, resulting in a between-group treatment difference of -0 7% (95% CI -0 9 to -0 4; -8 mmol/mol, 95% CI -10 to -4, p<0 0001). At the end of the study, the mean total daily insulin dose was 97 units (SD 56) with pump treatment versus 122 units (SD 68) for multiple daily injections (p<0 0001), with no significant difference in bodyweight change between the two groups (1 5 kg [SD 3 5] vs 1 1 kg [3 6], p=0 322). Two diabetes-related serious adverse events (hyperglycaemia or ketosis without acidosis) resulting in hospital admission occurred in the pump treatment group compared with one in the multiple daily injection group. No ketoacidosis occurred in either group and one episode of severe hypoglycaemia occurred in the multiple daily injection group. Interpretation In patients with poorly controlled type 2 diabetes despite using multiple daily injections of insulin, pump treatment can be considered as a safe and valuable treatment option.