The endoscope has a rectangular prism (6) rotatably supported on a shaft (8). An inner hollow tube (11) is connected with the prism such that movement of the hollow tube against an innermost hollow tube (15) guides to rotation of the prism around the shaft. A sleeve tube forms a hermetically sealed inner space. A permanent magnet is arranged within and outside of the inner space, where movement of the inner hollow tube and another inner hollow tube (12) against the innermost hollow tube takes place by magnetic forces, which are produced by the permanent magnet.