This article introduces an observer-based control strategy tailored for regulating plasma glucose in type 1 diabetes mellitus patients, addressing challenges like unknown time-varying delays and meal disturbances. This control strategy is based on an extended Bergman minimal model, a nonlinear glucose-insulin model to encompass unknown inputs, such as unplanned meals, exercise disturbances, or delays. The primary contribution lies in the design of an observer-based state feedback control in the presence of unknown long delays, which seeks to support and enhance the performance of the traditional artificial pancreas by considering realistic scenarios. The observer and control gains for the observer-based control are computed through linear matrix inequalities formulated from Lyapunov conditions that guarantee closed-loop stability. This design deploys a soft and gentle dynamic response, similar to a natural pancreas, despite meal disturbances and input delays. Numerical tests demonstrate the scheme’s effectiveness in glycemic level regulation and hypoglycemic episode avoidance.© 2024 John Wiley & Sons Ltd.