Gradient index endoscopic or borescopic systems in forms ranging from basic to more complex depending on the optical task. The basic form comprises a gradient index objective of less than a quarter period in length followed by a gradient index relay whose length is at least one-quarter period longer than the distance of the first image of the object into the relay. The numerical aperture of the objective is preferably larger than that of the relay to provide a wide angle endoscope with an "entrance aperture tunnel" preceding the objective. In one embodiment with a line-of-view prism the entrance tunnel is placed in the most restricted aperture within the prism thus minimizing or eliminating vignetting of the field of view. A second embodiment of this subsystem is an endomicroscope wherein the entrance pupil moves and changes size as the ocular focus of the system is changed. The endoscope retains the maximum possible Lagrangian of the system as limited by the numerical aperture and diameter of the relay for all foci.