Automated control of blood glucose in patients with type-1 diabetes has not yet been fully implemented. The aim of this study was to design and clinically evaluate a system that integrates a control algorithm with off-the-shelf subcutaneous sensors and pumps to automate the delivery of the hormones glucagon and insulin in response to continuous glucose sensor measurements. The automated component of the system runs an adaptive proportional derivative control algorithm which determines hormone delivery rates based on the sensed glucose measurements and the meal announcements by the patient. We provide details about the system design and the control algorithm, which incorporates both a fading memory proportional derivative controller (FMPD) and an adaptive system for estimating changing sensitivity to insulin based on a glucoregulatory model of insulin action. For an inpatient study carried out in eight subjects using Dexcom SEVEN PLUS sensors, prestudy HbA1c averaged 7.6, which translates to an estimated average glucose of 171 mg/dL. In contrast, during use of the automated system, after initial stabilization, glucose averaged 145 mg/dL and subjects were kept within the euglycemic range (between 70 and 180 mg/dL) for 73.1% of the time, indicating improved glycemic control. A further study on five additional subjects in which we used a newer and more reliable glucose sensor (Dexcom G4 PLATINUM) and made improvements to the insulin and glucagon pump communication system resulted in elimination of hypoglycemic events. For this G4 study, the system was able to maintain subjects' glucose levels within the near-euglycemic range for 71.6% of the study duration and the mean venous glucose level was 151 mg/dL.