The device is a unit with two separate fluid passage channels (main and bypass channels) where the opening of the main channel can be closed by a movable piston-disc. It lets the autonomous inflow control valve pass viscous oil through the main and bypass channels and pass water or gas only through the bypass channel. The position of the movable piston is determined by a balance of forces: hydrodynamic forces acting on the main channel side and hydrodynamic forces acting on the bypass channel side. The hydraulic resistance (a pressure drop) of the bypass channel for water and gas is much smaller than for viscous oil. According to it, the pressure from the side of the bypass channel for water/gas flow is higher than for viscous flow that causes the piston to move upwards and close the main channel.