A stent and a method for implanting a stent for decompression and anastomosis formation are provided. The stent includes a non-expandable, generally tubular body having a proximal portion and a distal portion, a lumen extending through at least a portion of the body, a distal opening in the distal portion in fluid communication with the lumen and a proximal opening in the proximal portion in fluid communication with the lumen. The stent further includes a first magnetic element positioned on the distal portion of the tubular body and a second magnetic element movably positionable on the proximal portion of the tubular body. The second magnetic element is configured to surround and move over the proximal portion of the tubular body towards the first magnetic element.