The Table Mountain Sandstone (TMS) is a group of rock formations within the Cape Supergroup sequence of rocks. Although the term “Table Mountain Sandstone” is still widely used in common parlance, the term TMS is no longer formally recognized; the correct name is the "Peninsula Formation Sandstone", which is part of the Table Mountain Group. The designation “Table Mountain Sandstone” will, however, in deference to the title, continue to be used in the rest of this article. The name is derived from the famous landmark in Cape Town, Table Mountain.
Table Mountain Sandstone is made up predominantly of quartzitic sandstone laid down between 510 and 400 million years ago. It is the hardest, and most erosion resistant layer of the Cape Supergroup. It therefore forms most of the highest and most conspicuous peaks in the Western Cape, as well as the steepest cliffs of the Cape Fold Mountains, despite being the oldest, and, therefore, lowermost of the Cape Supergroup sequence. The folding of the sequence into the parallel mountain ranges of the Western Cape started about 330 million years ago, affecting the Cape Supergroup from about Clanwilliam (approximately 200 km north of Cape Town), to about Port Elizabeth (approximately 650 km east of Cape Town). The Cape Supergroup sediments beyond these points are not folded into mountain ranges, but do, in places, form steep cliffs or gorges, where the surrounding sediments have been eroded away (see, for instance, Oribi Gorge in KwaZulu-Natal).
The Cape Supergroup rocks were laid down as sediments in a rift valley that developed in southern Gondwana, just south of Southern Africa, during the Cambrian-Ordovician Periods (starting about 510 million years ago, and ending about 330-350 million years ago). An 8 km thick layer of sediment accumulated on the floor of this rift valley. Closure of the rift valley, starting 330 million years ago, resulted from the drift of the Falkland Plateau back towards Africa, during the Carboniferous and early Permian periods. This caused the rucking of the Cape Supergroup into a series of parallel folds, running mainly east-west, but with a short section running north-south in the west (resulting from the collision with the eastward movement of Patagonia into southern Africa). Continued subduction of the paleo-Pacific Plate beneath the Falkland Plateau and the resulting further compression of the latter into Southern Africa, raised a mountain range of immense proportions to the south of the former rift valley. The folded Cape Supergroup formed the northern foothills of this towering mountain range.