Objective To evaluate the efficacy and safety of a detachable endoluminal balloon in the prevention of abdominal cavity contamination during transrectal natural orifice transluminal endoscopic surgery (NOTES). Methods The efficacy and safety of a detachable endoluminal balloon to maintain disinfection in the distal colon of the pigs were evaluated. The bacterial loads and colonic cleanliness were monitored. Additionally, the device was applied to another nine pigs that underwent a cholecystotomy by transrectal NOTES. Necropsy and pathological examination were performed after 28‐day follow‐up. Results All animals exposed to the device and one of the seven pigs not exposed to the device scored three points on the bowel cleanliness scale ( P < 0.001). After 30 min bacterial loads of the test (with balloon occlusion) and control (without balloon occlusion) groups showed a significant difference (0.8 × 10 3 CFU/mL vs 186.8 × 10 3 CFU/mL, P < 0.01). Cholecystotomy by transrectal NOTES with the device was successfully performed. The mean intraperitoneal procedure time was 102.9 ± 37.7 min. There were no procedure‐related adverse events. During the follow‐up, all animals presented normal behavior and appetite. No peritoneal infection or adhesion was detected at autopsy. Cholecystotomy and rectal incision were histologically healed and no histological abnormalities were detected in the colon related to balloon placement. Conclusions The detachable balloon provides a reliable solution for preventing peritoneal contamination during transluminal operations. The technique may assist in future transrectal NOTES.