A firearm including a gas drive, having an annular piston which is displaceably arranged on the barrel to form an expansion chamber between two end positions. At least one gas port penetrates the wall of the barrel in the region of the expansion chamber and a selector is provided. In order to provide a simple and easily adjustable mechanism, the expansion chamber is delimited by a ring surface and an inner cylinder surface of the piston, an end surface of the selector and the barrel. The selector is rotatably arranged on the barrel with at least two predefined rest positions. In each rest position, the gas flow from the expansion chamber is delimitable by at least one selector opening formed on the selector.