A surgical implant (900) for insertion into a biological lumen. The implant has an outer ring (915) having an outer wall and an inner wall the outer ring disposed about a central axis. The implant further has a flexible inner ring (925) adjacent to the outer ring inner wall disposed about the central axis defining an annular opening (960). The a first plurality of magnets (920) is embedded in the flexible inner ring. A second plurality of magnets (930) is located between the opening and the second plurality of magnets. The magnets are arranged around the opening to permit opening and closing of the opening through normal peristalsis.