An artificial valve (5 10 20 30 50) for implantation in a body, in or adjacent to a blood vessel, comprising a casing (12 37 61) and an opening and closing mechanism, at least part of said mechanism being a moving part (11 21, 22 31, 32, 33 51) adapted to make an opening and a closing movement to assume an open and a closed position for opening and closing, of the blood through said blood vessel, and positions between said open and closed positions, said closing movement of the moving part (11 21, 22 31, 32, 33 51) being initiated and carried out when a threshold value is reached by a parameter of the mammal or of a device (8) used by the mammal. The opening and closing mechanism is arranged to cause the moving part (51) to its closing movement by means of giving the moving part kinetic energy in a plurality of steps.