A mechanism for blocking the rotation of a roller blind having a winding roller with a spring drive used to block the sunshade in its set position of unwinding, immovably fixed to the holder fir the roller blind holder its winding roller, characterized in that it is built from a sleeve (1) with cams (2a), (2b), (2c), (2d) formed on its inner side and in the sleeve (1) there is located a roller (3) with a guide (4) as an oblong groove, formed above the cams (2a), (2b), (2c), (2d) on its cylindrical side and in the guide there is a ball (5) which during revolution of the roller (3) against the sleeve (1), depending on the direction of that rotation, is moved between the cams (2a), (2b), (2c), (2d) or blocked in a pocket (2e) formed in the cam (2b) in positions from I to IV, blocking or releasing relative revolution of the roller (3) and the sleeve (1). In another embodiment cams (2a), (2b), (2c), (2d) are formed on the roller (3) and the guide (4) is formed on the sleeve (1).