Upwelling of cool seawater, paleoceanographic circulation, paleoclimate, local tectonics and relative sea-level change controlled the lithofacies and sequence stratigraphy of a carbonate ramp and overlying platform that are part of a temporally well constrained carbonate complex in the Melilla basin, northeastern Morocco. At Melilla, from oldest to youngest, a third-order depositional sequence within the carbonate complex contains (1) a retrogradational, transgressive, warm temperate-type rhodalgal ramp; (2) an early highstand, progradational, bioclastic platform composed mainly of a temperate-type, bivalve-rich molechfor facies; and (3) late highstand, progradational to downstepping, subtropical/tropical-type chlorozoan fringing Porites reefs. The change from rhodalgal ramp to molechfor platform occurred at 7.0??0.14 Ma near the Tortonian/Messinian boundary. During a late stage in the development of the bioclastic platform a transition from temperate-type molechfor facies to subtropical/tropical-type chlorozoan facies occurred and is bracketed by chron 3An.2n (??? 6.3-6.6 Ma). Comparison to a well-dated carbonate complex in southeastern Spain at Cabo de Gata suggests that upwelling of cool seawater influenced production of temperate-type limestone within the ramp and platform at Melilla during postulated late Tortonian-early Messinian subtropical/tropical paleoclimatic conditions in the western Paleo-Mediterranean region. The upwelling of cool seawater across the bioclastic platform at Melilla could be related to the beginning of 'siphoning' of deep, cold Atlantic waters into the Paleo-Mediterranean Sea at 7.17 Ma. The facies change within the bioclastic platform from molechfor to chlorozoan facies may be coincident with a reduction of the siphoning of Atlantic waters and the end of upwelling at Melilla during chron 3An.2n. The ramp contains one retrogradational parasequence and the bioclastic platform three progradational parasequences. Minor erosional surfaces that bound the upper surface of the ramp and upper surface of the oldest platform parasequence are related to relative falls in sea level induced by local volcanism and associated tectonic uplift. These local relative falls had little influence on a broader-scale rise to stillstand in relative sea level that controlled development of the transgressive and early highstand systems tracts represented in the ramp and platform, respectively. ?? 2002 Elsevier Science B.V. All rights reserved.