Main

Dinosaurs evolved in the mid-part of the Triassic, as indicated by the earliest unequivocal dinosaur fossils in upper Carnian deposits8 and the remains of close dinosaur ancestors in the Middle Triassic9. However, terrestrial ecosystems dominated by dinosaurs of various trophic levels and taxonomic affinities, a structuring that would persist until the end-Cretaceous mass extinction, did not appear until the Early Jurassic, some 30 million years later10. Many non-dinosaur tetrapods (for example, most temnospondyl amphibians, procolophonid parareptiles, rhynchosaurs, phytosaurs and pseudosuchians, and some therapsids) became extinct during this interval, leading to the rise of dinosaurs being considered one of the most classic examples of a macroevolutionary biotic replacement. Two main contrasting models have been proposed to explain this event. The traditional ‘competitive replacement model’ argues that dinosaurs outcompeted their rivals because of more efficient physiologies, new anatomical adaptations or different feeding habits11,12. By contrast, the ‘opportunistic replacement’ model focuses on the role of stochastic processes that would have enabled the early radiation of dinosaurs following a diversity decline, or total extinction, of other groups13,14,15. There are still various opinions on the impact of the mass extinction at the end of the Triassic on the evolutionary success of dinosaurs7,16. New findings and more accurate chronostratigraphic dating have improved our understanding of the patterns of early Mesozoic tetrapod evolution17. However, no single hypothesis seems capable of explaining the rise of dinosaurs fully and critical questions about how dinosaurs established their dynasty on land remain largely unanswered18,19,20,21,22,23,24.

The Late Triassic–earliest Jurassic tetrapod communities from the Polish Basin, the eastern sub-basin of the Central European Basin (Fig. 1 and Supplementary Information), represent snapshots of principal stages of early dinosaur evolution, representing assemblages in which (1) dinosaur precursors, dinosauriforms, had a minor ecological role (the Krasiejów–Woźniki biota, mid–late Carnian); (2) the first predatory dinosaurs began to diversify (the Poręba–Kocury biota, mid–late Norian); (3) early dinosaurs had a moderate ecological role (Lisowice–Marciszów biota, late Norian–earliest Rhaetian); (4) the first large herbivorous dinosaurs, sauropodomorphs, appeared (the Gromadzice–Rzuchów biota, mid–late Rhaetian); and (5) diversified saurischian and ornithischian dinosaurs completely dominated the terrestrial ecosystem (the Sołtyków–Hucisko biota, latest Rhaetian–earliest Hettangian).

Fig. 1: Terrestrial vertebrate assemblages from the Polish Basin across the Carnian to Hettangian.
figure 1

a, Global events: curve of partial pressure of CO2 in ppm. A, oldest dinosaurs; B, the first phase of dinosaur radiation (late Norian); C, end-Triassic extinction; D, CAMP volcanism; E, the first ecosystems dominated by dinosaurs. b, Geological and fossil record from the Polish Basin. Clim., climatology; Litho., lithology; Biost., biostratigraphy; Chronost., chronostratigraphy; Divers., diversity; TJBCE, Triassic–Jurassic boundary climatic events in the Polish Basin7; gen., genera; Vol, Voltzia flora; Lax, Laxitextella conchostracan fauna; Cor, Corollina meyeriana palynoflora; Brc, Brachyphyllum flora; Gre/Shi, Gregoriusella/Shipingia conchostracan fauna; Lep/Brc, Lepidopteris/Brachyphyllum flora; Lep, Lepidopteris flora; Rha, Rhaetipollis germanicus; Cer, Cerebropollenites thiergartii; Bul, Bulbilimnadia conchostracan fauna; Tha, Thaumatopteris flora; VAZ, Voltzia floral assemblage zone; BAZ, Brachyphyllum floral assemblage zone; LAZ, Lepidopteris floral assemblage zone; TAZ, Thaumatopteris floral assemblage zone. Vertebrate diversity (Supplementary Table 2): I–V, vertebrate assemblages (dinosauriforms represented by black and non-dinosauriform vertebrates by grey silhouettes). 1, small actinopterygian fish; 2, large actinopterygian fish; 3, hybodont (Hybodontiformes) and rhomphaiodon (Synechodontiformes) sharks; 4, dipnoan fish; 5, coelacanth fish; 6, plagiosaurid temnospondyls; 7, trematosaurid temnospondyls; 8, capitosaurid temnospondyls; 9, phytosaurs; 10, lepidosauromorphs; 11, sharovipterygids; 12, silesaurids; 13, aetosaurs; 14, rauisuchians; 15, cynodonts; 16, dicynodonts; 17, turtles; 18, small basal theropods; 19, small neotheropods; 20, thalattosaurids; 21, pterosaurs; 22, crocodylomorphs; 23, mammaliaforms/mammals; 24, ornithischian dinosaurs; 25, large neotheropods; 26, large predatory dinosauriforms/basal theropods; 27, quadrupedal sauropodomorphs; 28, bipedal sauropodomorphs; 29, giant neotheropods; 30, large sauropodomorph/early sauropod; 31, ?heterodontosaurids. Itaxa, ichnotaxa. Trophic structures: the numbers used in the trophic pyramids correspond to those presented in the faunal assemblages. Vertebrate bromalites: TL, total length; MD, maximum diameter; S, Sołtyków; H, Hucisko; G, Gromadzice; L, Lisowice; M, Marciszów; P, Poręba; K, Krasiejów; W, Woźniki. The \({{p}_{{\rm{CO}}}}_{2}\) curve is based on soil carbonate proxies59. For other and more detailed data from the Polish Basin, see the Supplementary Information.

Here we analyse the rise and early evolutionary radiation of dinosaurs using a completely new approach. We used an array of methods, including synchrotron microtomography (Methods and Supplementary Table 1), to perform analyses of more than 500 bromalites (coprolites, cololites and regurgitalites) and other fossils with direct evidence of feeding (for example, bones with signs of predation/scavenging). We used these data to reconstruct trophic structures in the five fossil assemblages from the terrestrial Late Triassic and earliest Jurassic record of Poland (Fig. 1, Supplementary Information and Supplementary Tables 29) to see how they evolved over time. In addition, a range of palaeoenvironmental data were compiled to investigate the timing of climate and environmental changes relative to floral and faunal turnovers7,25,26,27,28 (Fig. 1). The fossil assemblages were selected to span the interval of interest in a well-correlated, restricted geographical area, which is important because the rise of dinosaur supremacy was probably diachronous across Pangaea (for example, as a result of climatic barriers spanning north–south)18,24. The most comprehensive data for detailed food web reconstructions derive from the three most fully described biotas (denoted as 1, 3 and 5 above and I, III and V in Fig. 1), known from thousands of skeletal and trace fossils. The other fossil assemblages complement our knowledge of the plant and vertebrate diversity in the area, and the ecosystem changes that occurred between them over time.

Late Triassic food webs

The Late Triassic bromalites show a big disparity (Fig. 1, Supplementary Information and Supplementary Tables 39) and contain a wide range of food remains, including tetrapod bone and tooth fragments, fish remains (sometimes articulated), plants, bivalves and exceptionally preserved arthropods, including numerous beetles and a cycloid larva (Fig. 2, Extended Data Figs. 110 and Supplementary Information). The repeatability of their shapes and contents allows a categorization of morphological groups and identification of probable producers (Supplementary Information).

Fig. 2: Feeding evidence inferred from bite marks and synchrotron-scanned bromalites from Krasiejów, Lisowice and Sołtyków.
figure 2

a, Big spiral bromalite (Institute of Paleobiology, Polish Academy of Sciences (ZPAL) AbIII/3401), presumably from the large dipnoan Ptychoceratodus38, containing a semi-articulated fish (note the close-ups of articulated ganoid scales and a pelvic fin). b, Bite marks and bone-rich bromalites attributed to the archosaur Smok36, exemplified by a dicynodont fibula with tooth marks (ZPAL V.33/471) and a coprolite containing teeth and bones (ZPAL V.33/471). c, Siderite bromalites (Polish Geological Institute—National Research Institute (MUZ PGI OS-221/300 and 306)), most likely produced by large predatory theropods, containing large bones including crocodylomorph limb bones. d, One of several insect-bearing Silesaurus bromalites (ZPAL AbIII/3520) with near-complete specimens of the beetle Triamyxa coprolithica34,35. e, Tooth-bearing temnospondyl bone from regurgitalite ZPAL AbIII/3417a, which also contains fish and supposed archosaur remains (Supplementary Information). Producer: Polonosuchus. f, Plant fossils from herbivore bromalites. Top left, Komlopteris pinna (Palaeozoic and Mesozoic of the National Biodiversity Collection—Herbarium KRAM at the W. Szafer Institute of Botany, Polish Academy of Sciences (KRAM) P PM 68/HS4/13). Top right, abaxial surface and stoma of Desmiophyllum KRAM P PM 68/HS5/25. Bottom left, gingkophyte cuticle with resin bodies, KRAM P PM 68/HS2/5. Bottom right, details of Nilssonia abaxial cuticle from fluorescence microscopy of KRAM P PM 68/PS6/10. See also Barbacka et al.42 and the Supplementary Information.g, Fragment of big fish-bearing coprolite ZPAL AbIII/3440, probably produced by the phytosaur Paleorhinus, and close-ups of a tooth plate and articulated fish vertebrae. h, Fragments of plant-bearing elongated bromalites (ZPAL V.33/1203, ZPAL V.33/1206 and ZPAL V.33/1037). i, Plant fragments from acid-dissolved dicynodont bromalites (ZPAL V.33/1107-1109). The bromalites derive from Krasiejów (a, d, e, g), Lisowice (b, h, i), and Sołtyków (c, f). Scale bars, 10 mm (a, b, c, d (left), e, g (right)); 1 mm (d (right), f (left), g (inset), g (left), h (all)); 0.5 mm (i (left)); 0.1 mm (i (middle)); 50 µm (f (right), i (right)). Credits: Images adapted with permission from: a, ref. 38, Springer Nature Limited; b, ref. 36, Springer Nature Limited; d, ref. 35, Elsevier.

Bromalites that were subjected to molecular analysis (specimens from Poręba and Lisowice) share similar molecular compositions, with a prominence of the polar fraction and a small proportion of aromatic compounds (Supplementary Information). The preservation of labile organic compounds such as α- and β-amyrins, α-amyrone, sterols, palmitin, stearin and levoglucosan attests to rapid mineralization of the faeces at very early stages of diagenesis. The identification of such compounds as n-alkanes with predomination of short-chain homologues supports the influence of bacteria during this mineralization process.

The mid–late Carnian Krasiejów–Woźniki vertebrate community (Fig. 1 and Supplementary Information), the oldest of the studied assemblages, was composed of fish (hybodont sharks, actinopterygians and sacropterygians), temnospondyls (Cyclotosaurus, Metoposaurus and a plagiosaurid), therapsids (the medium-sized dicynodont Woznikella and the small eucynodont Polonodon) and various archosauromorphs (Ozimek, Paleorhinus, Polonosuchus, Stagonolepis), including the omnivorous dinosauriform Silesaurus – the only known dinosaur relative in the biota29. Even if the precise time relation between the two fossil sites that make up this biota is not fully understood, finds of invertebrates (arthropods, bivalves) and certain tetrapods (a silesaurid and an eucynodont) indicate a very similar age30,31.

The younger Poręba–Kocury community shows that dinosaur precursors persisted alongside true theropod dinosaurs into the mid–late Norian in the region (Fig. 1 and Supplementary Information). Silesaurids and early saurischians (a supposed herrerasaurid and a potential neotheropod) probably constituted a common ecological structuring during this stage of early dinosaur evolution, but sauropodomorphs were still absent. Some typical Late Triassic vertebrates were also a part of this biota, including sarcopterygians, temnospondyls, phytosaurs (known from isolated teeth), a large archosaur predator (a rauisuchian known from teeth and isolated bones), abundant turtles (Proterochersis) and aetosaurs (Kocurypelta). In addition, characteristic pentadactyl footprints (Pentasauropus) and oval-shaped, plant-rich bromalites from Poręba suggest the presence of medium-sized to large dicynodonts. Terrestrial turtles appear in the Poręba–Kocury assemblage, but have not been found in other fossil communities in the area.

In contrast to the Carnian–Norian biotas, no phytosaur, aetosaur, rauisuchian or silesaurid remains are known from the fossil record of the slightly younger, late Norian–earliest Rhaetian, sites at Lisowice and Marciszów (Fig. 1 and Supplementary Information). Instead, the tetrapod components of the Lisowice–Marciszów biota comprised the giant dicynodont Lisowicia, the large theropod-like Smok, small and medium-sized theropods, an omnivorous/herbivorous early dinosaur (supposedly an early ornithischian), a variety of small diapsids/archosauromorphs (for example, a sphenodont, a thalattosaurid, a crocodylomorph, gliding/flying reptiles), a eucynodont, a mammaliaform (Hallautherium) and temnospondyls (Gerrothorax, Cyclotosaurus). The ichnological record of this biota is mainly represented by tracks of large dicynodonts (Pentasauropus), small to large theropods (Grallator, Anchisauripus, Kayentapus and Eubrontes) and early ornithischians (Anomoepus)32. There is thus an overlap between the bone and trace records in the Lisowice–Marciszów assemblage. No sauropodomorph fossils (bones or tracks) have so far been found in association with the Lisowice–Marciszów assemblage, perhaps suggesting that they had not colonized the Polish Basin by the late Norian–earliest Rhaetian (approximately 205–210 million years ago (Ma)). The absence of sauropodomorphs stands out, as they had inhabited most of the rest of the Central European Basin since the mid–late Norian24,33.

The first definitive appearance of herbivorous sauropodomorphs in the Polish Basin is instead evidenced by small Evazoum and large Tetrasauropus-like tracks from the mid–late Rhaetian Gromadzice–Rzuchów assemblage (Fig. 1 and Supplementary Information). This biota is known only from a modest fossil record, but shows that sauropodomorphs lived alongside crocodylomorphs (Batrachopus-like tracks), early ornithischians (small Anomoepus tracks) and small to large theropod dinosaurs (Grallator, Anchisauripus and Eubrontes tracks). Rare skeletal fossils (cranial fragments and teeth) suggest that some temnospondyls were still present (Cyclotosaurus), but no other characteristic Late Triassic tetrapods, such as phytosaurs or pseudosuchians, are known from this mid–late Rhaetian site of the Polish Basin.

We reconstructed food webs using this direct evidence for trophic interactions (bromalites and bite marks), complemented with comparative anatomy and functional morphology data for taxa lacking bromalite records (Fig. 3 and Supplementary Information). The composition of the vertebrate assemblages varies between the sites, but the inferred diets and trophic interactions have many similarities. Terrestrial and aquatic food webs were interconnected in the Late Triassic. Small to medium-sized carnivores based their diets mostly on fish and, at least in Krasiejów–Woźniki, also on insects34,35 (Fig. 2 and Extended Data Figs. 17 and 10). In bromalites from Poręba and Lisowice, the presence of biomarkers such as phytanic and pristanic acids, which are characteristic constituents of fish oil, further highlights how common piscivory was in these assemblages. Positive evidence of tetrapod prey is relatively rare and attributable to, at most, a single terrestrial top predator in each assemblage: the rauisuchian Polonosuchus of the Krasiejów–Woźniki biota and the osteophagous theropod-like archosaur Smok of the Lisowice–Marciszów biota36 (Fig. 2). Some bromalites from Krasiejów and Woźniki contain plant remains (Supplementary Information), but plant-rich herbivore bromalites are more commonly found in the post-Carnian sites Poręba, Lisowice, Marciszów and Gromadzice–Rzuchów.

Fig. 3: Reconstructed food webs across the Triassic–Jurassic transition, model for the dinosaurs’ stepwise rise to dominance and key phases of dinosaur evolution in the Polish Basin.
figure 3

a, Food webs from the mid–late Carnian Krasiejów–Woźniki biota (bottom), the late Norian–earliest Rhaetian Lisowice–Marciszów biota (middle) and the earliest Hettangian Sołtyków–Hucisko biota (top). Black arrows indicate trophic relationships inferred from direct evidence of feeding (bromalites and bite marks). Grey dotted lines indicate trophic relationships inferred from indirect ecological evidence such as comparative anatomy and functional morphology. Vertebrate guilds: light brown, terrestrial top predators; orange, small to medium-sized terrestrial carnivores; brown, small insectivores; green, terrestrial herbivores; purple, near-shore piscivores; and light blue, pelagic carnivores. See Fig. 1 and Supplementary Table 2 for taxon identities. Floras (Supplementary Information) are exemplified by the following: I, Sphenopteris, Glyptolepis and Pterophyllum (Voltzia floral assemblage); II, Brachyphyllum, Podozamites and Lepidopteris (Brachyphyllum floral assemblage); and III, Komlopteris, Nilssonia and Podozamites (Thaumatopteris floral assemblage). b, Model for the stepwise rise of dinosaurs in the Polish Basin (north-central Pangaea) based on the trophic interactions in a and the two intermediate biotas Poręba–Kocury and Gromadzice–Rzuchów (the right column), and other data from the Polish Basin (main text, Extended Data Figs. 110 and Supplementary Information).

Large, elongated, non-spiral bromalites from Krasiejów that are full of fish remains (Extended Data Fig. 3) were probably produced by Paleorhinus. This phytosaur possessed an elongated rostrum with long, sharp teeth adapted for piscivory. Other fish-bearing bromalites are assigned to hybodont sharks, actinopterygians, lungfishes and temnospondyls, on the basis of the content, internal structure, size and morphology (for example, presence/absence of spirals) of the bromalites. Some elongated bromalites from Krasiejów are attributed to Silesaurus and indicate that this animal mostly ingested insects, especially beetles34,35. However, other remains of fish and plants show that these constituted at least occasional, or possibly seasonal, meals (Supplementary Information). The aetosaur Stagonolepis shows some adaptations for a scratch-digging feeding ecology37, and its dentition suggests that it was herbivorous or omnivorous. Elongated plant-bearing bromalites, which contain numerous plant cuticles, wood remains and palynomorphs, that can putatively be assigned to aetosaurs were collected in Krasiejów, Woźniki and Poręba (Supplementary Information). A few specimens of oval-shaped bromalites, rich in organic particles and small plant remains, have also been found in both Krasiejów and Woźniki. They seem to represent droppings of a relatively large herbivore, most likely a dicynodont (Supplementary Information). Two large bromalites from Krasiejów contain partly dissolved bone remains of tetrapods. These were most likely produced by Polonosuchus, a large rauisuchian and top predator of the mid–late Carnian, which is also associated with bite marks on aetosaur bones. However, most bromalites associated with the Krasiejów–Woźniki biota derive from secondary and tertiary consumers that fed on fish and/or insects. Some are spiral and were thus produced by animals with a spiral gut valve (hybodont sharks, actiopterygians and sarcopterygians). These contain fish bones and scales, bivalves and arthropods34,35,38. Non-spiral bromalites, which have not been possible to assign to specific producers, bear evidence that several aquatic and terrestrial tetrapods of different sizes fed on fish, insects and/or plants (Supplementary Information).

Abundant bromalites attributed to Lisowicia39, the youngest and largest known dicynodont in the fossil record32,40, suggest that it had a restricted diet, feeding principally on conifers (Supplementary Information). Numerous cuticle fragments (mainly resistant Brachyphyllum remains) were also extracted from bone-bearing bromalites of a large theropod-like predator (Smok), and were probably involuntarily ingested while feeding. Moreover, plant remains in elongated bromalite specimens from Lisowice indicate the presence of another much smaller terrestrial herbivore, probably the early ornithischian dinosaur known from the skeletal and track record of the site. Several small to medium-sized theropods are known from the body and track fossil records of the Lisowice–Marciszów biota32; these are the most likely candidates responsible for producing the elongated bromalites containing fish and bone fragments. Bromalites with spiral structures also contain various fish remains, including lepidotrichia, teeth, bones, abundant scales and soft tissue remains. Some of the fish remains are semi-articulated in a manner similar to that previously described for a bromalite from the Carnian of Krasiejów38 (Fig. 2a). Small spiral bromalites were most likely produced by hybodont sharks or actinopterygians and larger ones by dipnoans and coelacanths, all known from the body fossil record at Lisowice, which seem to have been exclusively piscivorous (with the exception of a partly durophagous lungfish32). Small non-spiral bromalites were most likely produced by small diapsids/archosauromorphs, eucynodonts or mammaliaforms, all known from skeletal fossils of the site.

Ichnofossils associated with the mid–late Rhaetian Gromadzice–Rzuchów section suggest that a slightly different fauna had appeared in the region just before the dawn of the Jurassic. Plant-rich bromalites and up to 40-cm-long sauropodomorph tracks indicate the presence of relatively large herbivorous dinosaurs. In addition, two fish-bearing bromalites, produced by medium-sized predators, were found in the same interval. These were perhaps produced by theropods, known from a high diversity of 10- to 30-cm-long tridactyl tracks (Grallator, Anchisauripus, Kayentapus and Eubrontes). The fauna also included early ornithischian dinosaurs (Anomoepus tracks), crocodylomorphs (Batrachopus-like tracks) and temnospondyls (Cyclotosaurus bones and teeth).

Transitional Triassic–Jurassic food webs

The latest Rhaetian-early Hettangian localities at Sołtyków and Hucisko (Fig. 1 and Supplementary Information) provide evidence of a rich dinosaur assemblage in the Polish Basin. The fauna is inferred from rare bone findings and a well-studied ichnological record. It consisted of theropods of various sizes (cf. Stenonyx, Grallator, Anchisauripus, Kayentapus and Eubrontes; cf. Megalosauripus tracks), at least two small ornithischians (Anomoepus and Delatorrichnus tracks), three medium-sized to large sauropodomorphs (cf. Tetrasauropus; cf. Otozoum and Parabrontopodus tracks), a large turtle (unnamed tracks), a small pterosaur (Pteraichnus-like tracks), a small crocodylomorph (Batrachopus), a small lepidosauromorph (Rhynchosauroides tracks), a medium eucynodont (Dicynodontipus tracks) and a small mammaliaform (cf. Ameginichnus tracks)7.

The bromalites from Sołtyków are very diverse in shape, phosphatic or secondarily mineralized (by siderite or pyrite), and measure from a few millimetres to more than 30 cm in length. Theropods, known from up to 55-cm-long tracks41, probably produced the large bone-bearing bromalites. One of these contains skull and limb elements of an early crocodylomorph, which probably belong to the animal that produced the Batrachopus tracks (Fig. 2 and Supplementary Information). However, the menu of these large theropods probably extended far beyond crocodilians, as evidenced by the presence of fish scales and bone fragments of much larger prey items, which probably represent large sauropodomorph rib or limb fragments (Supplementary Information). Surprisingly, the large theropod bromalites also contain plant cuticles and palynomorphs of a high diversity, including plants previously unknown in the area. This possibly suggests that the large theropod, or its prey, had a big habitat or migrated across substantial distances42. Small to medium-sized elongated bromalites tentatively assigned to crocodylomorphs and theropod dinosaurs contain fish and small tetrapod remains. Moreover, many bromalites of various morphologies and geochemical compositions from a fine-grained lake interval suggest that fishes and small tetrapods were more abundant and diverse than the fossil record suggests.

Elongated, oval-shaped or irregular bromalites produced by herbivores (sauropodomorphs and ornithischians) contain numerous well-preserved plant remains, which also are more diverse than the flora inferred from the host rocks42. The affinities of the cuticles suggest that the herbivorous dinosaurs fed on seed ferns, cycads, ginkgophytes and bennettitaleans, which grew in a floodplain environment42. This is drastically different from the one-sided, conifer-dominated content of the Late Triassic herbivore bromalites. Charred wood, probably originating from widespread wildfires43,44,45, was also commonly ingested by the earliest Jurassic herbivores, but not carnivores, as suggested from pyrolytic geochemical signatures and charcoal (inertinite) bromalite inclusions (Supplementary Information and Supplementary Tables 1012). The burnt wood was probably ingested accidentally with unburnt parts of the plants after wildfires, or intentionally ingested for detoxification46,47. The n-alkanes from the bromalite samples suggest a feeding environment located in a rainforest climate regime, and common biomarkers include those from various conifer families, bacteria and ectomycorrhizal or wood-rot fungi48,49,50 (Supplementary Information section 3.9).

Discussion

The Late Triassic to earliest Jurassic interval was characterized by global climatic changes and an episode of extensive volcanism in the Central Atlantic magmatic province (CAMP)51,52,53. Large-scale tectonic processes on Pangaea, and the resulting shift of the position of the Polish Basin northwards in the latest Triassic, was the main factor behind the environmental changes in the area. The northward drift may have contributed to the termination of regional aridity, as has been suspected for contemporary successions in Greenland54 and Sweden55. Data from the Polish Basin reflect a persistent subtropical warm and dry climate during most of the Late Triassic, with humid phases occurring in the middle Carnian (the Carnian Pluvial Event), the late Norian and the late Rhaetian5,6,7 (Fig. 1 and Supplementary Information). On a broader scale, the Late Triassic environments in central Europe were subjected to a marked change from seasonally arid continental (Carnian–middle Norian) to permanent humid (mid–late Rhaetian–early Hettangian) conditions, coincident with the opening of internal seaways into the Pangaean interior and the marine inundation of central Europe. The increased humidity allowed a diversified vegetation cover to develop. These large-scale climatic trends led to environmental changes and reconfigurations of the floral assemblages in the region7,25,26,27,28,56, which in turn had large effects on the tetrapod communities (Fig. 1). Several rapid climatic events (hot and humid periods, separated by cooler and drier periods) can be distinguished in the Triassic–Jurassic boundary interval in the Polish Basin7. The late Rhaetian interval of these events coincides with negative δ13Corg excursions, perturbation of the osmium isotope system (attributed to volcanic fallout), polycyclic aromatic hydrocarbon occurrences and a turnover in the palynoflora, which suggest influences of the CAMP flood basalts on the Polish Basin and its ecosystems. These abrupt, short events are recorded on a regional scale in the basin, but it is more difficult to determine their direct impact on local faunas. The transition from Krasiejów–Woźniki to Sołtyków–Hucisko plant assemblages coincided with the disappearance of many typical Triassic groups of non-dinosaurian tetrapods. This is captured in the skeletal and footprint fossil record, but also in the diversity and content of bromalites. It is noticeable that the bromalite fossil record reflects the faunal turnovers in the late Norian–earliest Rhaetian and middle Rhaetian–early Hettangian intervals (Fig. 1 and Supplementary Information). Food residues extracted from dicynodont and aetosaur bromalites support feeding habits considerably different from those of the newly emerging herbivorous dinosaurs. As specialists, aetosaurs and dicynodonts were potentially more constrained than the dinosaur herbivores in shifting their diets towards the new prevailing flora. As a result, the terrestrial herbivore guild was completely replaced by sauropodomorphs and ornithischians by the mid–late Rhaetian–earliest Hettangian. There are many indications that herbivorous sauropodomorphs did not adapt to new conditions locally, but rather migrated, in the mid–late Rhaetian time, to the Polish Basin as soon as ecological conditions allowed it. The first sauropodomorphs appear in the fossil record of the Northern Hemisphere temperate belt about 214 Ma23. This dispersal was related to a concomitant attenuation of climate barriers, but it can also be speculated that this migration may be the result of the search for new suitable habitats. The timing and abruptness of these Late Triassic faunal changes throughout Pangaea have been much discussed, and it has become increasingly clear that the diversification and dispersal of early dinosaurs were complex and influenced by climatic factors18,19,20,21,22,23,24,57. The fossil record from the Polish Basin shows that it was during the late Norian–earliest Rhaetian interval (and not during end-Carnian, mid-Norian or end-Triassic events) that phytosaurs, rauisuchians, aetosaurs, dicynodonts and other Triassic groups experienced the greatest reduction in diversity. The disappearance of these formerly dominant tetrapods is mirrored by an increased abundance of dinosaurs in the body and trace fossil records58 (Fig. 1 and Supplementary Information). Based on our model in a restricted geographical setting, we show that the rise of dinosaurs to ecological dominance can be broken down into five phases (Fig. 3), marking the appearance of:

  1. 1.

    small, opportunistic and omnivorous dinosaur precursors in the mid–late Carnian;

  2. 2.

    fauna with dinosaur precursors and the first predatory dinosaurs in the mid–late Norian;

  3. 3.

    diversified small to medium-sized predatory theropods, as well as the first large theropods and omnivorous/herbivorous ornithischians in the late Norian–earliest Rhaetian;

  4. 4.

    small ornithischians and medium-sized to large herbivorous sauropodomorphs and diversified theropods in the mid–late Rhaetian and finally;

  5. 5.

    a dinosaurian diversification and expansion of ecospace occupation in the latest Rhaetian–earliest Hettangian.

The last two phases were probably the result of two superimposed processes: environmental changes and the appearance of new dietary key adaptations that enabled exploitation of the new food resources in an unprecedented way (Fig. 3). The biggest change in trophic dynamics, specified by a large diversity increase in bromalite shape and contents, occurred in the latest Rhaetian–earliest Hettangian, the time interval marked globally by massive volcanism, the end-Triassic extinction and the immediate early recovery following it. It is difficult to assess what direct impact these events had on the evolution of dinosaur diversity and trophic complexity, but the timing of the events suggests that there was a complex interplay of several processes: a degree of opportunism coupled with anatomical differences or increased phenotypic plasticity that enabled herbivorous dinosaurs to better cope with the environmental changes.

Despite the biases and uncertainties of the fossil record (for example, selective preservation/sampling of rocks, animals, tissues and environments), we demonstrate that integrated analyses of body fossils, tracks and bromalites (Supplementary Tables 29 and 13) provide robust pictures of past food webs, casting new light on early dinosaur evolution and the origin of the first complex dinosaur faunas with megaherbivores and predators. The apparent changes in bromalite morphologies and their contents are easily explained given the shift in faunal composition and tetrapod diversity across the Late Triassic and earliest Jurassic interval. These conclusions are further supported by the fact that the studied bromalites originate from similar sedimentary environments, and that herbivore bromalites, which are typically rare, have been recovered from all biotas (Supplementary Table 13 and Extended Data Figs. 14, 7 and 9). Our data suggest that climatic and environmental changes and the ensuing substantial transformations in vegetation were an important stimulus for the development of dinosaur faunas in the Late Triassic ecosystems of the Polish Basin. The data also indicate that the main environmental changes that occurred at the very end of the Triassic period paved the way for the early radiation and increased abundance of dinosaurs. Our results support the idea that stochastic processes coupled with a competitive advantage enabled the enormous evolutionary success of dinosaurs. In sum, the dinosaurs rose to supremacy in a stepwise fashion across 30 million years of evolution. Thanks to an increased resolution of the fossil record and stratigraphical control in regional basins across this time, we can use data to describe these steps, here presented as five distinct phases, which we believe can also describe global patterns (Fig. 3b).

Methods

Fieldwork and data collection

The bromalites derive from natural or artificial Upper Triassic and Lower Jurassic site exposures located in Silesia and the Holy Cross Mountains in the Polish Basin area (Supplementary Information and Supplementary Figs. 1–9 in ref. 60). A total of 532 bromalites have been collected from eight fossiliferous sites (Supplementary Tables 29). The specimens were collected between 1996 and 2017 by G.N., T.S., K.O., G. Pieńkowski and M.Q. All bromalites are stored in the scientific collections of the Polish Geological Institute—National Research Institute (Warszawa, Kielce; acronym Muz. PGI; Muz. PGI OS), Institute of Paleobiology, Polish Academy of Sciences (Warszawa; acronym ZPAL). Specimens were photographed and measured; some of them, representing characteristic morphotypes, are presented in illustrations (Supplementary Figs. 14–26 in ref. 60).

Optical microstructure observations

Numerous bromalites were studied in detail in thin sections. Standard petrographic thin sections were prepared and examined under an optical microscope (Nikon Eclipse LV100 POL and Leica DM). Images were collected using digital cameras.

Phase-contrast synchrotron microtomography

More than 100 bromalite specimens from Krasiejów and Lisowice (Supplementary Tables 3 and 6) were scanned using propagation phase-contrast synchrotron microtomography as part of project ES145 at beamline ID19 of the European Synchrotron Radiation Facility in Grenoble, France. Specimens were selected for synchrotron scans after initial inspection showing that they contained well-preserved inclusions. Specimens from Woźniki, Poręba, Gromadzice–Rzuchów, Hucisko and Sołtyków were not synchrotron scanned (three specimens from Sołtyków were subjected to computed tomography, but the results are not presented here).

Different scan settings were applied to the bromalites (depending on their size) to maximize resolution, while still maintaining a field of view that would capture an entire specimen; the specific parameters for all the four different scan settings that were used are provided in Supplementary Table 1. For all scans, the propagation distance (that is, the distance between the sample on the rotation stage and the camera) was 2,800 mm and the camera was a sCMOS pco.edge 5.5 detector. Reconstructions of the scanned data were based on a phase-retrieval approach61,62,63. Ring artefacts were corrected by using an in-house correction tool63. Binned versions (bin factor of 2) were calculated for fast processing and screening of the samples. The final volumes consist of stacks of JPEG2000 or TIFF images that were imported and segmented in the software VGStudio MAX v.3.1 (Volume Graphics Inc.).

Identification of the excrement producer

The bromalites were classified according to their gross morphology, but also their composition and inclusions (Fig. 1 and Supplementary Tables 39). On the basis of the comparison with other Late Triassic and Early Jurassic bromalites, and considering features such as shape, size, content and stratigraphic provenance, we identify which taxon/ichnotaxon was the most likely producer. These data were complemented with comparative anatomy, general feeding ecology and functional morphology data for taxa/ichnotaxa recorded (skeletal data and identified trackmakers) from the assemblages (Supplementary Information and Supplementary Fig. 10 in ref. 60).

Analysis of plant cuticles

Bromalites were treated with 10% hydrochloric acid (HCl) and 20% hydrofluoric acid to remove sediment. Retrieved cuticles were macerated using Schultze’s reagent (25% nitric acid with a few crystals of potassium chlorate) and subsequently treated with 5% potassium hydroxide. The residue was rinsed with water after each step. Macerated cuticles were washed with distilled water and dehydrated in pure glycerine. Each cuticle was kept in an Eppendorf tube in pure glycerine with a few drops of thymol to prevent fungal growth. Cuticles were analysed with a Nikon Eclipse 50i transmitted light microscope and documented with a Nikon DSFi2 digital camera and Nikon NIS-Elements imaging software. Selected cuticles were analysed using a Philips XL30 environmental scanning electron microscope (SEM).

Measurements of length, width and surface area of the cuticles were made using the NIS-Elements software. The length of a cuticle was measured according to the arrangement of epidermal cells that indicate a top and a base of an organ (for example, leaf or seed) between the most distal ends. The width of a cuticle was measured perpendicular to the length. Because of the irregular shapes of the cuticles, the surface area was estimated using the NIS-Element tool ‘ellipse’ for measuring surface.

Scanning electron microscopy coupled with energy-dispersive X-ray spectroscopy

Bromalite fragments from Krasiejów (5 specimens), Poręba (3 specimens), Lisowice (6 specimens) and Sołtyków (11 specimens) were broken off, glued onto stubs and coated with platinum or gold. Material was analysed in a Philips XL20 SEM equipped with the energy-dispersive detector ECON 6, system EDX-DX4i and a backscatter electron detector for Compo or Topo detection (FEI product). This instrument was operated at an accelerated voltage of 25 kV, a beam current of 98–103 nA and a spot diameter of 4 μm. SEM images were collected.

Total organic carbon and total sulfur measurement

The total carbon, total sulfur and total inorganic carbon (TIC) contents were determined using an Eltra CS-500 IR analyser with a TIC module (at the Faculty of Natural Sciences, the University of Silesia, Katowice, Poland). The total organic carbon content was calculated as the difference between total carbon and TIC. An infrared cell detector of CO2 gas was used to measure the content of total carbon and TIC, which was evolved by combustion under an oxygen atmosphere for total carbon, and was obtained from reaction with 10% HCl for TIC. The standards used for the calibration were from Eltra. Analytical precision and accuracy were as follows: plus or minus 2% for total carbon and plus or minus 3% for TIC.

Organic petrology

Seven samples were selected for petrological observations (SOL1 a, b and c, SOL_3, SOL_4, SOL_5 and SOL_7). Vitrinite and fusinite reflectance for macerals from Sołtyków have been published elsewhere43. The sample preparation process follows the procedure described in ISO 7404-2 (2009). Microscopic examination of the samples in reflected light and immersion oil was performed using an optical microscope Axio Imager.A2m (Faculty of Natural Sciences, the University of Silesia, Katowice, Poland).

Extraction, separation and derivatization

The extraction with DCM (dichloromethane)/methanol (MeOH) (50:50, v:v) was done with a Dionex 350 Accelerated Solvent Extractor system (Thermo Scientific) at 80 °C in 34 ml stainless steel cells (pressure (p) = 10 MPa, solvent flow = 70 ml min−1). Each extract was concentrated and separated into three fractions, aliphatic, aromatic and polar, using micro-column chromatography64. The silica gel used for separation of a particular fraction had been activated at 120 °C for 24 h. The following elution method was applied: (1) n-pentane (aliphatic fr.), (2) n-pentane and DCM (7:3, v:v – aromatic fr.) and (3) DCM/MeOH (1:1, v:v – polar fr.). The polar fraction of seven selected samples was derivatized to trimethylsilyl derivatives by reaction with N,O-bis-(trimethylsilyl)trifluoroacetamide (BSTFA), 1% trimethylchlorosilane (Sigma-Aldrich) and pyridine (Sigma-Aldrich) for 3 h at 70 °C. Fractions were analysed by gas chromatography–mass spectrometry (GC–MS). Internal standards (ethyl vanillin, phenylindene) were added to the total extracts. A blank sample (silica gel) was analysed using the same procedure (including extraction and separation on columns). Only trace amounts of fatty acids and phthalates were found in the blank.

Gas chromatography–mass spectrometry

GC–MS analyses were carried out using an Agilent Technologies 7890A gas chromatograph and an Agilent 5975C Network mass spectrometer with triple-axis mass selective detector (MSD). Helium (6.0 grade) was used as a carrier gas at a constant flow of 2.6 ml min−1. The separation was obtained on a fused silica capillary column (J&W HP5-MS, 60 m × 0.25 mm i.d., 0.25 μm film thickness) coated with a chemically bonded phase (5% phenyl, 95% methylsiloxane), for which the gas chromatography oven temperature was programmed from 45 °C (1 min) to 100 °C at 20 °C min−1, then to 300 °C at 3 °C min−1 (hold 60 min), with a solvent delay of 10 min. The gas chromatography column outlet was connected directly to the ion source of the MSD. The GC–MS interface was set at 280 °C; the ion source and the quadrupole analyser were set at 230 °C and 150 °C, respectively. Mass spectra were recorded from m/z 45 to 550 (0–40 min) and m/z 50–700. The mass spectrometer was operated in the electron impact mode, with an ionization energy of 70 eV. All GC–MS analyses were performed at the Faculty of Earth Sciences, Sosnowiec. An Agilent Technologies MSD ChemStation E.02.01.1177, the Wiley Registry of Mass Spectral Data (tenth edition) and NIST 17 software were used for data collection and mass spectra processing.

Samples

Geological and palaeobotanical samples (Supplementary Figs. 11–13 and 27–31 in ref. 60), all the studied bromalite specimens and bone with bite marks (Supplementary Fig. 32 in ref. 60) are housed in the scientific collection at the Polish Geological Institute—National Research Institute (Warszawa, Kielce); at the Institute of Paleobiology, Polish Academy of Sciences (Warszawa); in the collections of research results at the University of Silesia (Sosnowiec; palaeobotanical data); in the palaeobotanical collection Palaeozoic and Mesozoic of the National Biodiversity Collection—Herbarium KRAM at the W. Szafer Institute of Botany, Polish Academy of Sciences, Cracow, Poland; and at Jagiellonian University (Kraków; palaeobotanical data).

Reporting summary

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