The study presents a robust closed-loop sliding mode controller with internal model for blood glucose control in type-1 diabetes. Type-1 diabetic patients depend on external insulin delivery to keep their blood glucose within near-normal ranges. Closed-loop artificial pancreas is developed to help avoid dangerous, potentially life-threatening hypoglycemia, as well as to prevent complication-inducing hyperglycemia. The proposed controller is designed using a combination of sliding mode and internal model control techniques. To enhance postprandial performance, a feedforward controller is added to inject insulin bolus. Simulation studies have been performed to test the controller, which revealed that the proposed control strategy is able to control the blood glucose well within the safe limits in the presence of meals and measurements errors. The controller shows acceptable robustness against changes in insulin sensitivity, model-patient mismatch, and errors in estimating meal's contents.