Tapagem Cave (or Devil’s Cave) is a river cave developed in the dolomite marble karst of the Serra do André Lopes (State of São Paulo, southeastern Brazil). Although this region is a plateau with significant variation in elevation and a humid subtropical climate, the cave is an anomalous feature in the André Lopes karst because there are few other caves. The marble, which is in a synclinal structure with subjacent phyllites, is a karst aquifer perched above the regional base level (Ribeira River) and has little allogenic recharge. The cave developed on a secondary anticline on the northwest flank of the marble synform forming a blind valley, the Tapagem River sink, that is an underground tributary of Ostras River. Development of the cave is due to the entrenchment of the Ostras through-valley and the large allogenic catchment area of the sink. In plan view, the morphology of the cave can be divided into three different sectors. The first sector, known as the Tourist Sector, has extensive collapse rooms, fossil passages and a variety of speleothems of notable dimensions. The second and most extensive sector is the river passage, which is a sinuous gallery controlled by marble banding with NE-SW cleavage and NW-SE fractures. In cross-section, the passages are vadose canyons up to 70 m in height, controlled by the marble banding. Four NW-SE diabase dykes in this passage do not affect its direction in plan view. The third sector is an extensive network of passages and collapse rooms, which are interlaced in plan view and on different levels, forming a maze pattern. Initially, the Tapagem and Ostras Rivers developed on a gentle surface and flowed into the Ribeira River. With the entrenchment of the Ostras through-valley, the Tapagem River partially infiltrated via a paleosink into the upper passage of the “Erectus Room," remaining a half-blind valley. Following a series of collapses and obstructions, the River next infiltrated via the current sink, creating a fully blind valley. Currently, the cave has a difference in elevation of 120 m between the sink and the resurgence, which corresponds to the difference in entrenchment between the two valleys.