An apparatus for controlling flow of intestinal contents in a patient suffering from, intestinal dysfunction, such as anal incontinence, reduced peristaltic function of the intestines and constipation, comprises an implantable constriction device for gently constricting (i.e. without substantially hampering the blood circulation in the tissue wall of the intestines) at least one portion of the tissue wall of the intestines to influence the flow of intestinal contents in the intestines, 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 of intestinal contents in the intestines. The apparatus can be used for restricting or stopping the flow of intestinal contents in the intestines, or for actively moving the intestinal contents in the intestines, with a low risk of injuring the intestines.