A medical endoscope (1) fitted with an optics duct (4) receiving an optical system (9, 10) enclosed by a system tube (6), the distal end of the optics duct (4) being closed by a window (5) to the inner surface of which is mounted an electrical heater (11), characterized in that the heating ring (11) rests against the inner surface of the window (5) while being pressed in that direction by a spring (13).