Introduction

Reconstructing past environments is critical to understanding the ecological dynamics of mammalian, including early hominin, occupation of regions within and beyond Africa. While the landscape of the Plio-Pleistocene transition has been extensively studied in eastern1,2,3,4,5,6,7,8, central9,10, and southern Africa2,11,12,13,14, there is a notable knowledge gap for the northern African region. The presence of sites with hominin-associated artefacts in Algeria15,16 and Morocco17,18 during the Early Pleistocene, dating to as early as 2.44 Ma, has put a spotlight on northern Africa for investigating hominin evolution and dispersals. Nevertheless, detailed insights into the palaeoenvironment of this region at that time remain sorely lacking.

The area presently occupied by the Sahara Desert has experienced, for over 8 Myr, short-lived (~8–14 kyr) periods of greening19, known as Green Sahara Periods (GSPs), that have facilitated the dispersal of diverse animal species19,20. Large-scale global studies have established the picture of a gradual shift towards a drier climate and greater environmental variability in the transition from the Pliocene to the Pleistocene, influenced by the Northern Hemisphere Glaciation21,22,23,24. However, the impact of these global-scale climate shifts on regional ecosystems and biodiversity is unclear25. Regional-scale studies provide critical, complementary perspectives to global models, where opposing local trends and a diversity of microhabitats in the same region can be explored26.

We present palaeoecological proxy information from the Guefaït-4.2 (GFT-4.2; 34° 13′ 3.4″ N, 2° 24′ 13.2″ W) fossil locality in eastern Morocco, dated close to the Plio-Pleistocene transition27 (Fig. 1; Supplementary Note 1 and Supplementary Fig. 1–3). GFT-4.2 was excavated with a trench of 28 m², revealing a 180 cm sequence formed by a palustrine event, in which more than 3000 large vertebrate remains were buried. Taphonomic study indicates a time-averaged fossil assemblage formed relatively quickly (in geological terms), consistent with the palaeomagnetic, stratigraphic, and biochronological data (Supplementary Note 1). We utilised bulk and sequential enamel stable carbon (δ13C) and oxygen (δ18O) isotope analysis, stable carbon isotope analysis from plant wax n-alkanes, dental microwear and mesowear analyses, and analyses of small vertebrates, pollen, micro-crustaceans and algae to provide on-site ecological evidence. Our approach aims to offer a holistic landscape reconstruction using the distinct palaeoenvironmental perspectives and varying temporal and spatial resolutions each proxy provides (Supplementary Note 2 and Supplementary Tables 1 and 2). We produce insights into the environmental conditions prevailing in northwestern Africa at the time of the documented presence of early hominins in the region.

Fig. 1: Archaeological and palaeontological sites.
figure 1

a Context of the study area in Africa. b Early Pleistocene (Thomas Quarry I–Unit L (ThI-L), Tighennif, El-Kherba, Ain Hanech, Mansourah and Ain Boucherit) and Plio-Pleistocene transition (Ahl al Oughlam, Ain Jourdel and Guefaït-4.2) sites of Morocco and Algeria. c Position of Guefaït-4.2 and other study area sites attributed to Early Pleistocene (Gara Soultana and Aïn Tabouda) and Middle Pleistocene (Oued Rabt).

Results

Stable isotope analysis of large vertebrate tooth enamel

δ13C values indicate a dominance of C3 plant consumption (trees, woody shrubs, bushes, herbs and temperate grasses) by mammals (δ13C range = −13.3‰ to −1.4‰; median = −9‰; n = 172; Figs. 2 and 3). However, abundant consumption of C4 plants (likely tropical grasses, shrubs and sedges) is reported in some sampled taxa. Hipparion sensu lato (n = 61; range = −11.3 to −1.4‰; median = −7.3‰) and Tragelaphini (n = 42; range = −11.6 to −3.9‰; median = −9.2‰) display the greatest variability in δ13C values, including the highest values within the assemblage. Gazella sp. (n = 19; range = −12.2 to −7.1‰; median = −10.4‰) and Anancus sp. (n = 12; range = −8.4 to −5.2‰; median = −6.9‰) exhibit mixed C3 and C4 values, with focus towards a C3 plant-based diet. Stephanorhinus africanus (n = 9; range = −10.8 to −9.1‰; median = −9.6 ‰), Suinae (n = 4; range = −11.8 to −9.8‰; median = 10.8‰), Hexaprotodon sp. (n = 13; range = −13.3 to −8.6‰; median = −9.6‰), and Macaca cf. sylvanus (n = 4; range = −12.5 to −11.8‰; median = 12.3‰28) exhibit exclusive C3 plant consumption, with the latter two species presenting the lowest values of the assemblage. The δ13C values observed in carnivorans reflect those of their prey29,30,31. In the case of GFT-4.2, all carnivorans including the Canidae (n = 6; range = −11.2 to −9.1‰; median = −9.8‰), Dinofelis sp. (n = 1; −11‰), and Hyaenidae (n = 1; −8.9‰) were consuming animals with a C3 plant-based diets.

Fig. 2: The δ13C and δ18O values from the tooth enamel of fossil fauna from GFT-4.2.
figure 2

The isotopic data for M. cf. sylvanus have been previously published in ref. 28. Each point corresponds to a tooth enamel sample with a total of 168. Silhouettes from PhyloPic (http://phylopic.org). Tragelaphini, Suinae, S. africanus, Dinofelis sp., and Hyaenidae are under the public domain. Canidae (by Sam Fraser-Smith, vectorised by T. Michael Keesey), M. cf. sylvanus (by Kai R. Caspar), Hexaprotodon sp. and Hipparion s. l. (by Zimices), and Gazella sp. (by Rebecca Groom) are licensed under Attribution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/). Anancus sp. (by Henry Fairfield Osborn, vectorised by Zimices) is licensed under Attribution-ShareAlike 3.0 Unported (https://creativecommons.org/licenses/by-sa/3.0/). Source data are provided as a Source Data file.

Fig. 3: Jitter boxplots of δ13C values of fossil fauna from GFT-4.2.
figure 3

Boxes represent the interquartile range (IQR), defined by the 25th (Q1) and 75th (Q3) percentiles, with the median value indicated by a line within the box. Whiskers extend from the box to the minimum and maximum values within 1.5 times the IQR from the quartiles, while data points outside this range are considered outliers. Error bars show the standard deviation (SD). Each point corresponds to a tooth enamel sample. Source data are provided as a Source Data file.

The δ18O values of all animal samples (n = 172; Fig. 2) measured from GFT-4.2 range from −6.5‰ to 8.8‰ with a median of −1.5‰. Gazella sp. (n = 19; range = −2.5 to 8.8‰; median = −0.8‰) exhibits the highest δ18O values in the assemblage, followed by Tragelaphini (n = 42; range = −2.3 to 3.8‰; median = 0.2 ‰), Canidae (n = 6; range = −1.1 to 4.5‰; median = −0.6‰), and M. cf. sylvanus (n = 4; range = 0.6 to 1.8‰; median = 1‰28), which also have values towards the higher end of the spectrum. Hexaprotodon sp. (n = 13; range = −6.5 to −4‰; median = −5.1‰) shows the lowest δ18O values of any taxon, followed, in this order, by Suinae (n = 4; range = −5.1 to −3.3‰; median = −3.6‰), S. africanus (n = 9; range = −3.4 to −1.5‰; median = −3‰), Anancus sp. (n = 12; range = −3.3 to −0.9‰; median = −2.8‰), and Hipparion s. l. (n = 61; range = −5 to 1.1‰; median = −2‰). Unlike Canidae, the other two carnivores, Dinofelis sp. (n = 1; −1.4‰) and Hyaenidae (n = 1; −3.4‰), have δ18O values towards the lower end of the overall range. The complete dataset of bulk δ13C and δ18O values of mammalian teeth (n = 170) is presented in Fig. 2 and described in Supplementary Data 1.

The difference in δ18O values between non-obligate and obligate drinkers is a proxy for estimated palaeoaridity32,33,34,35,36,37. This difference in GFT-4.2 is 3‰ (obligate drinker mean: −2.5‰, non-obligate drinker mean: 0.5 ‰; Fig. 4 and Supplementary Note 3). The results have been compared to the difference between non-obligate and obligate drinkers in Laikipia (1.7‰) and Tsavo (2.2‰) in Kenya, defined as semi-arid savannas5,38. We also compare our data to results from fossil fauna remains from the Ahl al Oughlam site (1.9‰; Supplementary Note 3), penecontemporaneous to GFT-4.2, located in western Morocco, and defined as a dry environment39. Our findings show a greater difference between non-obligate and obligate drinkers GFT-4.2 compared to both the current savannas of Laikipia and Tsavo and the fossil site of Ahl al Oughlam, indicating a more arid environment.

Fig. 4: Jitter boxplots of δ18O values for non-obligate and obligate drinking taxa from GFT-4.2.
figure 4

Boxes represent the interquartile range (IQR), defined by the 25th (Q1) and 75th (Q3) percentiles, with the median value indicated by a line within the box. Whiskers extend from the box to the minimum and maximum values within 1.5 times the IQR from the quartiles, while data points outside this range are considered outliers. Error bars show the standard deviation (SD). Each point corresponds to a tooth enamel sample. The boxplots in the upper right corner correspond to all δ18O values of taxa grouped as non-obligate drinkers (Gazella sp. and Tragelaphini) and obligate drinkers (Hexaprotodon sp., Suinae, S. africanus, Anancus sp., and Hipparion s. l.). Source data are provided as a Source Data file.

For the intra-tooth sequences of δ13C and δ18O values, we analysed eight teeth of Hipparion s. l., comprising 180 intra-tooth enamel samples (Fig. 5 and Supplementary Data 2). Lower δ18O values are associated with the cold/wet season, while higher values correspond to the warm/dry season. For δ13C, values above −8‰ would indicate the consumption of C4 plants. We observed two distinct trends in the sampled teeth of this taxon. In the first (samples in Fig. 5a–e), the δ13C and δ18O values exhibit the same seasonal oscillation, with higher consumption of C4 plants during the warmer/drier season. In the case of one sample in Fig. 5a, the dominant consumption of C3 plants extended throughout the entire year, while in one sample in Fig. 5b, this pattern occurred with the consumption of C4 plants. However, in the second trend (samples in Fig. 5g, h), an inverse relationship between δ18O and δ13C maximum and minimum values was observed, indicating a greater consumption of C4 plants during the colder season. This inverse relationship between δ18O and δ13C may be associated with the altitudinal mobility of Hipparion s. l., indicating a higher consumption of C3 plants in the highlands during the warm/dry season and a higher consumption of C4 plants in the lowlands during the cold/wet season. This aligns with the fact that GFT-4.2 is in a mountainous region with altitudes ranging from 600 to 1700 metres. The sample in Fig. 5f shows a progressive increase in the consumption of C4 plants without a clear correlation with δ18O values.

Fig. 5: Sequential analysis of carbon and oxygen values of bioapatite enamel from Hipparion s. l. of GFT-4.2.
figure 5

a Sample GFT4.2-2019-S15/42. b Sample GFT4.2-2018-Q12/103. c Sample GFT4.2-2019-S15/124. d Sample GFT4.2-2019-R14/32. e Sample GFT4.2-2019-S14/10. f Sample GFT4.2-2019-R15/115. g Sample GFT4.2-2019-Q15/237. h Sample GFT4.2-2019-R13/68. ERJ enamel-root junction. Source data are provided as a Source Data file.

The cross-correlations analysis showed a significant relationship between intra-tooth δ13C and δ18O in seven of the eight samples (Supplementary Table 3 and Supplementary Fig. 4). The sample without correlation is GFT4.2-2019-R15/115 (Fig. 5f). Among the seven specimens with significant correlation, two (Fig. 5g, h) are negatively correlated, while five display positive cross-correlation coefficients (Fig. 5a–e).

Dental wear

The mesowear analysis measures the relief and sharpness of worn cusp apices on occlusal surfaces, ranging from sharp cusps and high relief (indicative of low abrasion and high attrition) to low relief with rounded cusps (indicative of high abrasion and low attrition). The mesowear scores (MWS) of the three analysed taxa from GFT-4.2 show a narrow range of MWS median values, from 1.4 to 3.1 (Fig. 6 and Supplementary Data 3). These MWS indicate low levels of abrasion for Gazella sp. (MWS = 1.4) and Tragelaphini (MWS = 1.9), suggesting a mixed feeding dietary trait dominated by leaf and fruit browsing. In Hipparion s. l., despite the MWS being 3.1, there is a high degree of variability among samples, indicating a wide range of dietary abrasiveness, ranging from browse-dominated mixed feeders to pure grazers.

Fig. 6: Boxplot with mesowear scores (MWS) of the ungulates from GFT-4.2.
figure 6

Boxes represent the interquartile range (IQR), defined by the 25th (Q1) and 75th (Q3) percentiles, with the median value indicated by a line within the box. Whiskers extend from the box to the minimum and maximum values within 1.5 times the IQR from the quartiles, while data points outside this range are considered outliers. Error bars show the standard deviation (SD). Each point corresponds to a tooth enamel sample. Extant ungulates database129. Silhouettes from PhyloPic (http://phylopic.org). Tragelaphini under the public domain, Hipparion s. l. (by Zimices) and Gazella sp. (by Rebecca Groom) are licensed under Attribution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/). Source data are provided as a Source Data file.

The microwear analysis classifies the extinct taxa along a continuum of dietary abrasiveness, ranging from pure browsers to pure grazers, including mixed feeders, based on the average number of pits and scratches (Fig. 7 and Supplementary Data 3). The Hipparion s. l. and the two Bovidae exhibit browse-dominated dietary traits, whereas Hexaprotodon sp., S. africanus, and Suinae show grass-dominated traits, with Anancus sp. exhibiting a pure grass-feeding pattern (Fig. 7). As with mesowear, microwear results reveal a wide range of diets, ranging from browse-dominated mixed feeders to pure grazers. Species in the browsing feeding space (Hipparion s. l. and the two Bovidae) have a higher number of pits and a lower number of scratches. By contrast, species in the grazer feeding space (Hexaprotodon sp., S. africanus and Suinae) have a lower number of pits and a higher number of scratches. Anancus sp. is placed among the extant pure grazers because it has the lowest number of pits (11.5). All taxa, except Suinae, exhibit puncture pits.

Fig. 7: Bivariate plot of the average numbers of pits and scratches for the species from GFT-4.2.
figure 7

Error bars correspond to standard deviation (±1 SD) for the fossil samples. Plain ellipses correspond to the Gaussian confidence ellipses (p = 0.95). Extant ungulates based on the database112. Silhouettes from PhyloPic (http://phylopic.org). Tragelaphini, Suinae and S. africanus are under the public domain. Hexaprotodon sp. and Hipparion s. l. (by Zimices), and Gazella sp. (by Rebecca Groom) are licensed under Attribution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/). Anancus sp. (by Henry Fairfield Osborn, vectorised by Zimices) is licensed under Attribution-ShareAlike 3.0 Unported (https://creativecommons.org/licenses/by-sa/3.0/). Source data are provided as a Source Data file.

Plant wax biomarkers

Odd-numbered, long-chain (i.e., C27-C31) lengths dominate the n-alkane biomarker distributions in plants and sediments. Of the ten samples analysed, all but one have C31 as the dominant n-alkane, with the C29 and C27 alkanes being the second and third most abundant compounds, respectively (Supplementary Note 4 and Supplementary Data 4). The relative abundances of the C25 and C27 n-alkanes are highly correlated (Spearman’s correlation, rs = 0.89, p = 0.007), as are the relative abundances of C29 and C31 (Spearman’s correlation, rs = 0.98, p ≤ 0.001), indicating that C25, C27, C29 and C31 were synthesised by multiple plant-life forms40,41. Furthermore, C25 and C27 co-vary in opposite directions to that of C29 and C31 throughout the sequence (Fig. 8), suggesting that both submerged or emergent and terrestrial plants contributed biomarkers to the investigated sediments. The average chain length (ACL21–33) ranges from 26.8 to 29.7 (28.2 ± 0.3, n = 10), consistent with previous measurements of modern ACL from African terrestrial plants42,43,44,45,46. The carbon preference index (CPI) of the C21-C33 n-alkanes ranges between 2.3 and 10 (5.6 ± 0.9, n = 8). These values are typical of plant-derived CPI values47,48,49,50 and indicate no significant plant wax degradation occurred51,52. The aquatic plant ratio (Paq)53 ranges between 0.0 and 0.6, while the submerged/terrestrial ratio (STR)54 ranges between 0.0 and 0.31, trending with the Paq values (Fig. 8).

Fig. 8: Isotopic and biomarker signatures of GFT-4.2 plant wax n-alkanes.
figure 8

See “Methods” for ACL calculation. Submerged or floating aquatic plants tend to have STR values greater than 0.25, whereas for the Aquatic Plant Ratio (Paq), aquatic plants tend to have values greater than 0.7, and values ranging between 0.1 and 0.7 typically represent a mixed input of terrestrial, emergent and submerged aquatic plants. The percentages of compound abundances are relative to the dominant n-alkanes (C25 + C27 + C29 + C31). Higher values reflect relatively increased inputs of the respective compounds. Source data are provided as a Source Data file.

The δ13C data from the C25-C31 n-alkanes further show that there are differences between the C25 and C27 n-alkanes and C29 and C31 (Student’s t-test two-tailed (t-test) p ≤ 0.0001; Mann–Whitney U test (MWU) p ≤ 0.0001; Fig. 8). δ13C values range between −31.5‰ and −28.0‰ (−29.4 ± 1.0‰, n = 36) and, when separated by n-alkane homologue, between −29.7‰ and −28‰ (C25, −28.6 ± 0.5‰, n = 9), −29.8‰, and −28.2‰ (C27, −28.6 ± 0.5‰, n = 9), −30.3‰ and −29.4‰ (C29, −29.8 ± 0.3‰, n = 9), and −31.5‰ and −29.5‰ (C31, −30.5 ± 0.8‰, n = 9). These δ13C data suggest a C3-dominated environment. There is a roughly 2.0‰ mean difference between C31 and both C25 (t-test, p ≤ 0.0001; MWU, p ≤ 0.0001) and C27 (t-test, p ≤ 0.0001; MWU, p = 0.0001), with the largest variation of 3.2‰ (GFT 10) between C31 and C25 and of 3.1‰ (GFT 5) between C31 and C27. Additionally, the mean difference between C29 and both C25 (t-test, p = 0.0001; MWU, p = 0.001) and C27 (t-test, p ≤ 0.0001; MWU, p = 0.001) is 1.2‰, with the largest variation between C29 and C25 being 1.8‰ (GFT 1 and 10) and between C29 and C27 being 1.9‰ (GFT 1). On the other hand, C29 and C31 differ on average by only 0.8‰ (t-test, p = 0.03; MWU, p = 0.1), and C25 and C27 differ on average by only 0.2‰ (t-test, p = 1; MWU, p = 0.719). This suggests that the plant-wax input into GFT-4.2 sediments is characterised by two groups; one source contributing predominantly C25 and C27 n-alkanes, and the other contributing C29 and C31 n-alkanes.

Pollen analysis

Concentrations of pollen, spores and other palynomorphs are low throughout the sequence (22.1–286.8 palynomorphs per gram of dry sediment). Tree cover is suggested in four samples by the presence of pine (Pinus sp.) and evergreen oak (Quercus ilex-coccifera type) and the occasional presence of alder (Alnus). Shrub vegetation is not represented, due to the scarce pollen dispersion of these taxa. Herbaceous vegetation is represented by wild grasses (Poaceae), Asteraceae (Tubuliflorae and Liguliflorae types), Amaranthaceae, Apiaceae and Fabaceae (Supplementary Fig. 5 and Supplementary Data 5).

Non-pollen palynomorphs (NPP) include mainly fungal spores such as Polyporisporites, Polyadosporites, Glomus sp., Exesisporites and hyphae. Trilete spores from mosses or ferns have also been identified. Other palynomorphs identified (HdV 303 or “protists”) have an undetermined ecological origin or are linked to chitin remains of insects and mites (HdV 5255). Additionally, microcharcoal concentrations are low, ranging from 18.4 to 157.9 particles per gram (Supplementary Fig. 5).

Small vertebrates

The rodent assemblage is composed of four murine species (Paraethomys pusillus, Paraethomys chikeri, Golunda aouraghei, and Praomys cf. skouri), two gerbils (Gerbillidae indet. 1, Gerbillidae indet. 2), a ctenodactyline (Irhoudia sp.), a sciurid (Atlantoxerus sp.), and a glirid (Eliomys sp.) (Supplementary Note 5 and Supplementary Fig. 6). The herpetofaunal assemblage includes an anuran (Anura indet., an alytid or ranid frog), a lizard (Lacertidae indet.), an anguid lizard (Ophisaurus sensu lato), and two snakes (Natricidae/Elapidae indet. and Colubridae/Lamprophiidae indet.) (Supplementary Note 4 and Supplementary Fig. 7).

Micro-crustaceans and algae remains

The sediment samples from the GFT-4.2 section yielded ostracod valves and algae remains (Supplementary Fig. 8 and Supplementary Note 6). The recorded ostracod taxa comprise Ilyocypris sp., Cypridopsis vidua, Neglecandona neglecta, Cyprideis torosa, Potamocypris sp., Heterocypris salina, Herpetocypris sp., Cypris pubera, and Psychrodromus sp. (ordered by decreasing abundance). Additionally, green macroalgae represented by gyrogonites from three distinct charophyte species occur in two samples, with one sample including as many as 217 gyrogonites per 100 g.

Discussion

Our transdisciplinary, multiproxy approach demonstrates a high degree of habitat variability and environmental heterogeneity at Guefaït-4.2 at the time of the Plio-Pleistocene transition. Wetlands are evidenced by the presence of emergent and submerged plants, as suggested by plant wax biomarkers, non-pollen palynomorphs, and taxa such as ranid or alytid frog indicate a permanent water source. Micro-crustaceans and green algae taxa indicate the presence of a shallow, mostly fresh to slightly brackish water body with a dense aquatic plant cover on the floor. Living hippopotami need to submerge in water, and Hexaprotodon sp. suggests a water depth that was never less than 1.5 m. The geological and stratigraphical context of GFT-4.2, characterised by clays, marls and palustrine limestones, including local conglomerates and sandstones56,57, also supports the presence of water bodies. Meanwhile, tree pollen, dental microwear of species with a leaf-browsing diet, and species like M. cf. sylvanus, P. cf. skouri, and Ophisaurus s. l58. indicate the presence of woodlands and humid environments. Additionally, previous studies on the GFT-4.2 macaques link their ecology to the presence of trees28. The presence of puncture pits in most large vertebrates suggests the consumption of hard objects, such as fruits or seeds59,60. Open grasslands are identified through wild grass pollen and mammalian taxa with a grazing diet (C3 and C4 grasses). Some small-vertebrate taxa in the assemblage are also characteristic of open grassy ecosystems, such as G. aouraghei61, and indeed most of the heliophilic reptiles, and Irhoudia sp. and Eliomys sp. exhibit a preference for rocky habitats62,63.

This environmental mosaic is further highlighted by the isotopic data. The δ13C values in plant waxes and large vertebrates indicate a predominance of C3 plants in the region. However, Hipparion s. l., Tragelaphini, Anancus sp., and Gazella sp. also consumed C4 plants (grasses, sedges or woody shrubs), which may be due to their ability to move over greater distances and select their food. Aridity and warm temperatures are evidenced by the presence of C4 plants64. The significant differences in δ18O values between obligate and non-obligate drinkers corroborate the hypothesis of lower rainfall totals. Additionally, the sequential isotopic analysis performed on Hipparion s. l. shows some individuals with marked seasonal aridity, with higher consumption of C4 plants during the warm/dry season, while others exhibit a diet associated with seasonal altitudinal mobility. Some species are associated with arid conditions, such as gundis (Irhoudia sp.65), ground squirrels (Atlantoxerus sp.66,67), G. aouraghei and the giant tortoise (Centrochelys). Also, changes in the abundance of microcharcoals in the sediments suggest the proliferation of natural forest fires during arid periods68. This combination of proxies reveals the important role of temperature and precipitation seasonality in the region.

Together our proxy data demonstrate that the overall environmental context in GFT-4.2 and its surroundings was highly ecotonal. A permanent water body was likely fed by streams or rivers draining the neighbouring highlands, and these were probably surrounded by either forests with overlapping canopies or woodlands with canopies that did not overlap extensively. The riparian woodland would have then transitioned into a wooded grassland that contained stretches of grasses and other herbs and only scattered woody plants. There was likely another structural change toward an open grassland with woody species only occurring in specialised microhabitats that were dependent on water availability. Finally, these lowland dry grasslands would have transformed into montane forests at higher elevations. Climatically, the region was probably generally warm with very arid summers and potentially even semi-desertic conditions, with the vegetation structure dictated by periodic fluctuations in water availability due to seasonal droughts.

It is important to note the varying temporal and spatial scales of our proxies when considering the reconstructed landscape diversity (Supplementary Table 1 and Supplementary Note 2). Pollen and plant waxes can be transported over long distances by various factors, providing reconstructions of the wider region. For example, evidence of forest reconstructed by these proxies at GFT-4.2 could be a riparian forest or woodland in the immediate vicinity of the site or a more distant (e.g., high-altitude) representation. It is also important to note that the production of pollen and waxy compounds varies with plant type and species48,69, meaning that certain habitats will be over- or under-represented. Meanwhile, our dental wear and stable isotope results are heavily influenced by the dietary preferences of the sampled large vertebrate taxa, with grazers, for example, finding patches of forage in landscapes even where grassland areas are limited7. This complicates predicting the extent of these grasslands, something further exacerbated by the fact that these taxa can range widely. However, having several taxa of small and large vertebrates in GFT-4.2 and applying multiple proxy approaches in the same sequence (Supplementary Fig. 2) makes the ecological reconstruction more robust. Indeed, the various scales of these proxies are also a strength, further highlighting the environmental diversity experienced on local and regional scales.

The diet of some taxa in GFT-4.2 provides the oldest known evidence of significant consumption of C4 plants by large herbivores in northern Africa, especially by Hipparion s. l. C4 plants are virtually absent during the Late Pliocene and Early Pleistocene in Europe70,71 and northern Africa39,72,73, and their presence in GFT-4.2 opens up the possibility of an ecosystem not previously considered in these latitudes, contributing to the regional habitat heterogeneity at a time that coincides with the earliest hominin occupations in northern Africa. To date, the oldest hominin occupation is found in Algeria at the Aïn Boucherit site (2.44 Ma74; Fig. 1b), which has a chronology slightly younger than GFT-4.2 and is also located in the Intra-Atlas Maghrebian Depression56. In addition, the Aïn Beni Mathar–Guefaït Basin (Fig. 1c) is rich in archaeological sites like the Early Pleistocene sites of Aïn Tabouda and Gara Soultana with Mode 1 lithic tools, or the Middle Pleistocene site of Oued Rabt with Mode 2 lithic tools18. This reinforces the likely continuous presence of hominins in the region in which our site is located.

C4 plants constituted a significant component of the diet and habitat of several early hominins during the Late Pliocene and Early Pleistocene in eastern and southern Africa8,75,76,77. Even in Central Africa, 3000 km from the Rift Valley, the diet of Australopithecus bahrelghazali from Koro Toro in Chad (3.5 Ma78) was dominated by the consumption of C4 plants9. Nevertheless, the C4 open dry grasslands and shrublands were only one component of these hominin-occupied landscapes. The presence of C4 plants was part of a mosaic ecosystem comprising a great diversity of resources, including wetlands and savannas9,79,80, as is also the case of GFT-4.2. In contrast to some classical theories linking hominins to specific habitats81,82,83, recent studies in eastern Africa provide evidence for the important role of climate and habitat variability in hominin evolution26,84,85,86. Additionally, increased ecological resource variability is considered a major factor in species’ adaptive versatility80,87,88,89.

The aridity observed in GFT-4.2 is consistent with the global trend towards progressive aridification during the Plio-Pleistocene transition22,24. The period from ~2.7 to 2.55 Ma coincides with the presence of East African Rift System paleolake periods19,90 and seven Green Sahara Periods19, which could have created significant green corridors connecting eastern and northern Africa. However, the regional landscape complexity presented in GFT-4.2 can only be fully understood through terrestrial context studies, preferably on-site, complementing those conducted at a global scale in marine records. The Aïn Beni Mathar–Guefaït Basin likely contributed to the formation of spatially variable, ecologically diverse, and environmentally complex habitats, ranging from open dry grasslands to riparian humid forests. This broad spectrum of habitats created numerous resource-rich microhabitats, providing opportunities for niche diversification and specialisation among mammals, including hominins. The regional mosaic environment, combined with several Green Sahara Periods in the Plio-Pleistocene transition, may have facilitated the dispersal of mammal communities (including hominins) from central or eastern Africa to northern Africa, occupying ecosystems with resource availability similar to their original habitats.

Methods

Permissions, outreach, and engagement

All permits and authorisations for the excavation, sampling and study of the materials involved in this work were granted by the Direction du Patrimoine Culturel, Département de la Culture, Ministère de la Culture et de la Communication du Royaume du Maroc: 2016–2017 Ref. 734/15-06-2016. (Director: Abdellah Alaoui), 2018 Ref. 1121/n17/901/21-07-2017. (Director: Abdellah Alaoui), 2019 Ref. 042/n°1157/01-08-2018 (Director: Youssef Khiara). This Moroccan-Spanish project has carried out several different social and local engagement activities (students and local population) through different activities at the Musée Universitaire d’Archéologie et du Patrimoine (Université Mohammed Premier d’Oujda, BV Mohammed VI B.P. 524 Oujda 60000 Maroc—https://www.ump.ma/fr/musee-universitaire-darcheologie-et-du-patrimoine). Activities include guided visits and open days for (1) secondary school students and their teachers from Oujda and the Oriental region, (2) foreign researchers from various countries and institutions, and (3) teachers of subjects related to archaeology and geology. We have also organised visits to excavations for secondary school students from Jerada, Aïn Béni Mathar and Guefaït, and introductory seminars and training in archaeology for university students from various faculties of the Université Mohammed Premier d’Oujda. The authors affirm that human research participants provided informed consent for publication of the images in Supplementary Fig. 1.

Stable isotope analysis

Stable carbon (δ13C) and oxygen (δ18O) isotope analysis was performed on 11 large vertebrate taxa obtained from GFT-4.2 (Supplementary Fig. 3). Additionally, eight Hipparion s. l. teeth were selected for sequential analysis, resulting in the collection of 348 enamel bands for stable oxygen and carbon isotope analyses, 168 for bulk and 180 for sequential analysis (Supplementary Data 1 and 2). Buccal or lingual surfaces were systematically cleaned with a tungsten abrasive drill bit to remove any extraneous material. In Hipparion s. l. molars and premolars, the cementum was removed when necessary to access the enamel. Enamel powder for bulk analysis was extracted using a diamond-tipped drill along the entire buccal or lingual surface, following a line from apical to cervical extremities, to ensure the most representative measurement for the whole period of enamel formation. Due to the unknown exact mineralisation period for all the teeth and taxa analysed, we do not rule out the possibility that in this bulk average, we might be capturing part of the signal (some months) associated with the lactation period in some teeth. However, this signal (13C depletion or 18O enrichment) does not seem to be reflected in our results, showing consistent results among all samples analysed from the same taxa.

For sequential samples, we sampled from the crown apex to the enamel-root junction (close to the cervix of the crown). Each sample was a groove measuring 1–2 mm in width, perpendicular to the tooth growth axis, and extending through the thickness of the enamel layer. Hipparion s. l. was selected for the sequential analysis due to its pronounced hypsodonty and the well-documented dental development91. The permanent cheek teeth mineralisation and eruption sequence for Hipparionini is M1, M2, (P2, P3), P4 and M391,92. Since the M1 is the first to mineralise and record the signal from maternal milk during the initial months of mineralisation, we avoided sampling this tooth for the sequential analysis. The teeth sampled for GFT-4.2 were: P3/4 right, M3 left, M2 right, M3 right, P3/4 right, P3 left, P4 left, and M2 left (Supplementary Data 2). The enamel mineralisation period for extant Equus is approximately ~30 months for M2, ~22 months for P3, ~32 months for P4, and ~34 months for M393. However, some studies on Hipparionini based on intra-tooth isotopic analysis suggest a shorter mineralisation period for this genus (~12 months for M2; ~18 months for P3; ~24 months for P4 and M3)94,95. Our intra-tooth analyses support this shorter mineralisation for GFT-4.2 Hipparion s. l. teeth, showing sequences likely to span approximately 12–24 months.

Powdered enamel samples weighing between 3.5 to 9.5 mg were chemically treated at the Biomarkers Laboratory of the Institut Català de Paleoecologia Humana i Evolució Social (IPHES-CERCA) using protocols modified from Koch et al.96 and Tornero et al.97, wherein samples were treated with 0.1 M acetic acid CH3COOH (0.1 mL solution/0.1 mg of sample) for 4 h, neutralised with distilled water (5 rinsings), and freeze-dried. The δ18O and δ13C values of carbonates were determined using an automated carbonate preparation device (KIEL-III) coupled to a gas-ratio mass spectrometer (Finnigan MAT 252) at the Environmental Isotope Laboratory, University of Arizona, USA. Powdered samples were reacted with dehydrated phosphoric acid under vacuum at 70 °C. The isotope ratio measurement is normalised using a two-point method based on repeated measurements of the calcium carbonate international standards of NBS-19 (δ18O = −2.20‰VPDB, δ13C = +1.95‰VPDB) and NBS-18 (δ18O = −23.2 ± 0.1‰VPDB, δ13C = −5.014 ± 0.035‰VPDB) with a precision of ±0.11 ‰ for δ18O and ±0.08‰ for δ13C (1 sigma). Samples are typically run in sessions of 46 measurements with precision and normalisation determined for each session. Standards make up 13% of all measurements. Carbon and oxygen isotope composition was reported in δ notation, where δ13C or δ18O = [(Rsample/Rstandard) − 1], R = 13C/12C or 18O/16O, and δ is expressed in per mil, ‰. Carbon and oxygen values were reported relative to the Vienna Pee Dee Belemnite (VPDB) standard.

The cross-correlation analysis was generated using the “ccf” function in R (version 4.4.0) to assess the cross-correlation pattern between the δ13C and δ18O intra-tooth analysis and identify different forms of seasonal dietary responses (Supplementary Table 3 and Supplementary Fig. 4). The original R script is available in the following publication98. To establish if there were significant differences between the δ18O values between OD and non-OD taxa from different localities, we conducted a Welch’s ANOVA using PAST 4.0299 after confirming that the samples did not have a normal distribution (normality test) and also lacked homogeneity in variance (Levene’s test). The vertebrate faunal list of GFT-4.2 is in Supplementary Table 4.

Dental wear analysis

Dental specimens of ungulates were studied through mesowear and microwear analyses to assess dietary traits. This approach reflects the animal’s diet over the months or years before its death (long-term), as mesowear score does not change over short periods such as seasonal variations100,101,102,103. For the macroscopical mesowear analysis, 60 molars were analysed (Supplementary Data 3). Unworn teeth, highly worn teeth, and those with broken or damaged cusp apices were omitted from mesowear analysis. Cusp sharpness is sensitive to ontogenetic age among young and dentally senescent individuals. However, for intermediate age groups, mesowear is found to be less sensitive to age and more strongly related to diet104. Mesowear analysis is a method used to evaluate the relief and sharpness of worn cusp apices in ways that are correlated with the relative amounts of attritional and abrasive wear that they cause on the dental enamel. Mesowear was scored macroscopically from the buccal side of upper molars and the lingual side of lower molars, preferably the sharpest cusp105. Additionally, we have utilised teeth ranging from P3 to M3, as proposed by Kaiser and Solounias106. A diet with low levels of abrasion, such as browse (high attrition), maintains sharpened apices on the buccal cusps as the tooth wears. In contrast, high levels of abrasion result in more rounded and blunted buccal cusp apices. In this study, the standardised method introduced by Mihlbachler et al.105 was employed. The method is based on seven cusp categories (0 to 6), ranging in shape from high and sharp (stage 0) to completely blunt with no relief (stage 6). The average value of the individual mesowear data from a single sample corresponds to the mesowear score (MWS). The Fig. 6 was run using PAST 4.0299.

For the dental microwear analysis, a total of 191 molars and premolars were selected and moulded (Supplementary Data 3). The microwear signal reflects a short-term dietary effect, likely covering the last few days or weeks before death107. This signal has been defined as the ‘last supper’ effect108. Therefore, the dental microwear pattern can reveal the animal’s diet based on the local and seasonal environmental resources available shortly before death. All moulded specimens were carefully screened under the stereomicroscope, and 86 were discarded from the microwear study due to bad preservation or other taphonomical defects109,110,111. Before moulding, the occlusal surface of each specimen was cleaned using acetone and then 96% ethanol. The surface was moulded using high-resolution and light viscosity silicone (Heraeus Kulzer, PROVIL novo Vinylpolysiloxane, Light C.D. 2 regular set), and transparent casts were created using clear epoxy resin (C.T.S. Spain, EPO 150 + K151). Enamel microwear features were observed via standard light microscopy using a Zeiss Stemi 2000C stereomicroscope at 35× magnification on high-resolution epoxy casts of teeth, following the cleaning, moulding, casting, examination protocol and classification of features defined by Solounias and Semprebon112 and Semprebon et al.59. We used both upper and lower teeth from P4 to M3 according to Xafis et al.113. A standard 0.16 mm2 ocular reticle was employed to quantify the number of small and large pits (round scars), scratches (elongated scars with parallel sides), gouges (irregular edges and much larger and deeper than large pits) and puncture pits (deepest at their centres, symmetrical, crater-like features with regular margins). A quantitative count of total pits and scratches was conducted for the variables mentioned. However, for the remaining variables, a qualitative assessment of presence or absence was performed (1 = presence; 0 = absence). The scratch width score (SWS) is obtained by giving a score of ‘0’ to teeth with predominantly fine scratches per tooth surface, ‘1’ to those with a mixture of fine and coarse types of textures, and ‘2’ to those with predominantly coarse scratches. To achieve a more precise categorisation of grazers, browsers, and mixed feeders, we used the percentage of individuals possessing scratch numbers that fall between 0 and 17 in the 0.16 mm2 area (0–17%)114. The results were compared with a database constructed from extant ungulate taxa112. The microwear bivariate graphs (Fig. 7) were generated using the following R script115.

Plant wax biomarkers

Plant biomarker extraction and isolation

A set of ten samples (GFT 1 to GFT 10) from GFT-4.2 depositional sequence was analysed (see sampling location in Supplementary Fig. 2). Dry, homogenised sediment was subject to pressurised solvent extraction (Büchi Speed Extractor E–916) in three 10 min-cycles in 9:1 (v:v) DCM:MeOH at 100 °C and 103 bar/1500 psi. The solvent containing the total lipid extract (TLE) was concentrated to ~1 mL using a Büchi Syncore­Plus evaporator and then evaporated to dryness using a steady stream of N2 in separate, 4 mL glass vials. The TLE was separated into neutral, acid, and polar fractions by Aminopropyl column chromatography using 4 mL each of 2:1 dichloromethane:isopropanol, 4% acetic acid in diethyl ether, and methanol, respectively. Normal (n-) alkanes were isolated from the neutral fraction using silver nitrate-infused silica gel column chromatography with 4 mL hexane.

Molecular characterisation

The n-alkanes were analysed with an Agilent 7890B Gas Chromatograph (GC) System equipped with an Agilent HP-5 capillary column (30 m length, 0.25 mm i.d. and 0.25 μm film) and coupled to a 5977A Series Mass Selective Detector (MSD) at the Max Planck Institute of Geoanthropology, Jena, Germany. Samples were injected in pulsed split mode at 290 °C, and the GC oven was programmed from 60 °C (1 min hold) to 150 °C at 10 °C/min, then to 320 °C at 6 °C/min (10 min hold). Helium was the carrier gas with a constant flow of 1.1 mL/min. The MS source was operated at 230 °C with 70 eV ionisation energy in the electron ionisation (EI) mode and a full scan rate of m/z 50–650. Plant wax n-alkanes were identified by comparing mass spectra and retention times with an external C21-C40 standard mixture.

Average chain length (ACL), or the weight-averaged number of carbon homologues of the C21-C33 n-alkanes, was calculated as follows (Eq. 1):

$${{{\rm{ACL}}}}=\frac{21\left({C}_{21}\right)+22\left({C}_{22}\right)+\cdots+32\left({C}_{32}\right)+33({C}_{33})}{{C}_{21}+{C}_{22}+\cdots+{C}_{32}+{C}_{33}}$$
(1)

Where Cx is the abundance of the chain length with x carbons.

The carbon preference index (CPI), which examines the odd-over-even carbon number predominance and serves as an indicator for hydrocarbon maturity and degradation51, was calculated using the abundances of odd and even chain lengths from C21 to C33 and the following formula (Eq. 2):

$${{{\rm{CPI}}}}=\frac{\left({C}_{21}+{C}_{23}+{C}_{25}+{C}_{27}+{C}_{29}+{C}_{31}\right)+\left({C}_{23}+{C}_{25}+{C}_{27}+{C}_{29}+{C}_{31}+{C}_{33}\right)}{2\,\times ({C}_{22}+{C}_{24}+{C}_{26}+{C}_{28}+{C}_{30}+{C}_{32})}$$
(2)

The submerged/terrestrial ratio (STR), which differentiates alkanes produced by either submerged or terrigenous plants, with terrestrial plants generally having values <0.2554, was calculated as follows (Eq. 3):

$${{{\rm{STR}}}}=\frac{{C}_{25}}{{C}_{21}+{C}_{23}+\cdots+{C}_{31}+{C}_{31}}$$
(3)

The aquatic plant ratio (Paq), which differentiates n-alkyl compounds produced by either algae or terrigenous plants, with terrestrial plants generally having values <0.153, was calculated as follows (Eq. 4):

$${Paq}=\frac{{C}_{23}+{C}_{25}}{{C}_{23}+{C}_{25}+{C}_{29}+{C}_{31}}$$
(4)

Compound-Specific Carbon Isotope Analysis

δ13C values of n-alkane homologues C25-C31 were measured using an Agilent 7890 A GC System equipped with an Agilent DB-1MS-UI capillary column (60 m length, 0.25 mm i.d. and 0.25 μm film), coupled to a Thermo Fisher Scientific Delta V Plus Isotope Ratio Mass Spectrometer at the Max Planck Institute for Biogeochemistry, Jena, Germany. Samples of 1.0 μL were injected in splitless mode at 320 °C, and the GC oven was maintained for 1 min at an initial temperature of 110 °C before the temperature was increased to 320 °C at 5 °C/min (7 min hold). All the samples were measured in triplicates. Helium was the carrier gas with a constant flow maintained at 1.8 mL/min. We report δ13C values of C25-C31 n-alkanes as they were the most abundant in all samples.

The accuracy of the δ13C values was evaluated against an international standard laboratory mixture (Indiana A7, Arndt Schimmelmann, University of Indiana) injected after every three sample injections. The standard deviation of the C16-C30 n-alkane working standard was ≤0.5‰ for δ13C. Drift corrections were determined by the standards run after every sample. Carbon isotope composition was reported in δ notation, where δ13C = [(Rsample/Rstandard) − 1], R = 13C/12C, and δ is expressed in per mil, ‰. Carbon values were reported relative to the Vienna Pee Dee Belemnite (VPDB) standard. All mean δ13C values are reported with their standard deviation.

Finally, linear regression and Spearman’s rank test were used to correlate the molecular characterisations of ACL, CPI, and the δ13C values of the individual C25-C31 n-alkanes, while Student’s t-tests and Mann–Whitney U-tests were used to test the significance of differences between the C25-C31 δ13C values. These tests were performed after confirming the normal distribution (normality test) and the homogeneity in variance (Levene’s test) of our data. All tests were run using PAST 4.0399 and an Alpha (α) of 0.05.

Pollen analysis

A set of six samples (GFT 1, 2, 4, 6, 8 and 10) from GFT-4.2 depositional sequence was analysed (see sampling location in Supplementary Fig. 2a). Samples were treated with HCl, KOH, concentration with heavy liquid, and a final step with HF116,117. Counting was performed with an Olympus Cx41 microscope at 600 magnifications. Fossil pollen and Non-Pollen Palynomorphs (NPP) were identified using published keys118,119,120,121,122,123,124,125. Pollen, NPP and microcharcoal concentrations were calculated using the volumetric method (particles/g of dry sediment) described in refs. 117,126.

Small vertebrates

The small vertebrate material referred to here was recovered from sediment collected at the GFT-4 site, including GFT-4.2 locality (Supplementary Fig. 2a), during the excavation campaigns of 2017 and 2018. All sediment was water-screened using superimposed 4-, 1- and 0.5-mm mesh sieves. The collection from GFT-4 includes 330 rodent teeth corresponding to nine different taxa and 47 disarticulated cranial and postcranial bones of amphibians and squamates comprising at least five taxa. The vertebrate faunal list of GFT-4.2 is in Supplementary Table 4.

Micro-crustaceans and algae remains

Three sediment samples (GFT 1, 3 and 5 (GFT 5 is a sterile sample); see sampling location in Supplementary Fig. 2a) of 70–120 g from the GFT-4.2 section were disaggregated by treatment with 3% H2O2 for 48 h. The material was washed through 100-µm, 250-µm and 1000-µm sieves, dried, and calcareous remains picked from sieve residues under a low-power binocular Olympus SZ60 microscope. A Hitachi TM3000 scanning electron microscope was used for ostracod-valve documentation and to support identification, which was mostly based on the key for the modern Algerian fauna127, and western and central European fauna128.

Digital mapping

Digital terrain model source was carried out using ArcGIS 10.8 software (ETOPO2 (NGDC)), available at the Digital Mapping and 3D Analysis Laboratory (CENIEH, Spain) and TanDEM-X (DLR).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.