We expect to screen approximately 300 patients to allow 75 to be randomized. Twenty five subjects with kidney damage or high risk of kidney damage secondary to T2DM will undergo gastric bypass surgery. Another 25 sleeve gastrectomy and the final 25 will be treated using the American Diabetes Association protocol. Patients with HbA1c ≥9.0% will undergo individualised optimisation of glycaemia as this should improve surgical outcomes. Particular attention will be given to the avoidance of hypoglycaemia. Patients' other risk factors (including hypertension and dyslipidaemia) will be optimised based on the International Diabetes Federation guidelines.