A gas-operated semiautomatic rifle known under the name of Sauer 303 contains a slide with a slide operating mechanism, which is movable in the longitudinal direction of the rifle, and a slide element, which is movable by the slide operating mechanism between a locked and unlocked position. The slide element in this known rifle consists of a chamber provided with locking tabs, which can be moved by rotation about its longitudinal axis between a locked position and an unlocked position. Rotation of the chamber occurs via a guide sleeve, which can be moved in the longitudinal direction via two parallel push rods.