Apparatus including an optical system (20) for use in an endoscope is provided. The optical system has distal and proximal ends, and includes an image sensor (32), positioned at the proximal end of the optical system. The optical system also includes an optical member (34) having distal (36) and proximal ends, and shaped so as to define: (a) a lateral surface, at least a distal portion of which is curved, configured to provide omnidirectional lateral viewing, (b) a distal indentation (44) in the distal end of the optical member, and (c) a proximal indentation (48) in the proximal end of the optical member. The optical system also includes a convex mirror (40), coupled to the distal end of the optical member, and shaped so as define an opening through which the distal indentation passes. A distal lens (52) is positioned distal to the mirror. The optical member, the mirror, and the distal lens have respective rotational shapes about a common rotation axis.