A screw compressor including: a male rotor and a female rotor rotating while engaging with each other with rotation axes thereof in substantially parallel to each other; a main casing having a bore for arranging the male rotor and the female rotor; and a discharge casing abutting a discharge side end surface of the main casing in a rotor axial direction to cover an opening of the bore; a discharge chamber or a discharge flow path where compressed gas is discharged from a compression work chamber (36A, 36B) formed by the male rotor and the female rotor via an outlet port (23, 25) formed in at least one of the main casing and the discharge casing; a valve hole formed near the outlet port (23, 25) at an end surface of the discharge casing on at least one of sides of the male rotor and the female rotor and at a position opening to the compression work chamber; a bypass flow path connecting the valve hole and the discharge chamber or the discharge flow path with each other; and a valve body arranged in the valve hole, the screw compressor comprising: cylinder chambers (35, 70) provided on a rear surface side of the valve body; a piston reciprocally moving in the cylinder chambers (35, 70); a rod connecting together the piston and the valve body; a communication path (81, 120, 121, 83, 84, 85, 86, 112) for introducing a fluid on a discharge side of the compressor into the cylinder chambers (35, 70) on a side opposite to a valve body side of the piston and on the valve body side; a pressure discharge path (80, 80a, 80b, 85, 86) for discharging to a suction side of the compressor the fluid introduced into the cylinder chambers (35, 70) on the side opposite to the valve body side of the piston and on the valve body side; a plurality of valve means (42, 43) provided at the pressure discharge path (80, 80a, 80b) or the communication path (81, 120, 121, 83, 84, 85, 86, 112), the valve means changing pressure in the cylinder chambers (35, 70) on the side opposite to the valve body side of the piston and on the valve body side; and a controller detecting whether or not over-compression is occurring in the compression work chamber, the controller controlling the plurality of valve means (42, 43) to open the valve body upon detecting the over-compression and close the valve body upon not detecting the over-compression. a male rotor and a female rotor rotating while engaging with each other with rotation axes thereof in substantially parallel to each other; a main casing having a bore for arranging the male rotor and the female rotor; and a discharge casing abutting a discharge side end surface of the main casing in a rotor axial direction to cover an opening of the bore; a discharge chamber or a discharge flow path where compressed gas is discharged from a compression work chamber (36A, 36B) formed by the male rotor and the female rotor via an outlet port (23, 25) formed in at least one of the main casing and the discharge casing; a valve hole formed near the outlet port (23, 25) at an end surface of the discharge casing on at least one of sides of the male rotor and the female rotor and at a position opening to the compression work chamber; a bypass flow path connecting the valve hole and the discharge chamber or the discharge flow path with each other; and a valve body arranged in the valve hole, the screw compressor comprising: cylinder chambers (35, 70) provided on a rear surface side of the valve body; a piston reciprocally moving in the cylinder chambers (35, 70); a rod connecting together the piston and the valve body; a communication path (81, 120, 121, 83, 84, 85, 86, 112) for introducing a fluid on a discharge side of the compressor into the cylinder chambers (35, 70) on a side opposite to a valve body side of the piston and on the valve body side; a pressure discharge path (80, 80a, 80b, 85, 86) for discharging to a suction side of the compressor the fluid introduced into the cylinder chambers (35, 70) on the side opposite to the valve body side of the piston and on the valve body side; a plurality of valve means (42, 43) provided at the pressure discharge path (80, 80a, 80b) or the communication path (81, 120, 121, 83, 84, 85, 86, 112), the valve means changing pressure in the cylinder chambers (35, 70) on the side opposite to the valve body side of the piston and on the valve body side; and a controller detecting whether or not over-compression is occurring in the compression work chamber, the controller controlling the plurality of valve means (42, 43) to open the valve body upon detecting the over-compression and close the valve body upon not detecting the over-compression.