Both Zanzibar and Pemba are believed to have once formed part of the African continent, the separation of Pemba having occurred during the Miocene Epoch (about 23 to 5.3 million years ago) while Zanzibar dates from the Pliocene Epoch (about 5.3 to 2.6 million years ago) or even later. Various types of limestone form the base of both islands. Raised sands and sandstones also occur, together with varied residual deposits similar to alluvial strata on the adjacent mainland. Extensive weathering of the limestones combined with erosion and earth movements have resulted in a variety of soils including red earths, loams, clays, and sands. Flat areas of coral limestone occur to the east, south, and north of Zanzibar and on the western islands. In places the coral is overlain by shallow red earth or alluvium.