An apparatus for controlling a flow of fluid in a lumen formed by a tissue wall of a patients vas deference comprises an implantable constriction device for gently constricting (i.e. without substantially hampering the blood circulation in the tissue wall) at least one portion of the tissue wall to influence the flow in the lumen, and a stimulation device for stimulating the wall portion of the tissue wall. A control device controls the stimulation device to stimulate the wall portion, as the constriction device constricts the wall portion, to cause contraction of the wall portion constricted by the constriction device to further influence the flow in the lumen. The apparatus can be used for restricting or stopping the flow in the lumen, or for actively moving the fluid in the lumen, with a low risk of injuring the vas deference.