Volcanoes that spewed out lava and noxious gases for more than half a million years paved the way for dinosaurs to rule the Earth by wiping out their competitors, scientists say.

The environmental devastation wrought by relentless volcanic activity at the end of the Triassic period 200m years ago laid waste to animal species that lived alongside the early dinosaurs, giving them the upper hand in the Jurassic period that followed.

Before the rise of the dinosaurs, the animal world was dominated by crurotarsans, ancient relatives of modern crocodiles. But as their populations crashed, early therapods, the group of dinosaurs that includes all meat-eating species from Velociraptor to Tyrannosaurus rex, gained ground and thrived.

More than 200m years ago, most of the land on Earth was locked up in the Pangea supercontinent, but this broke apart when the North American and African tectonic plates parted. The separation of the plates created a basin that became the Atlantic ocean and opened up fissures in the Earth's crust, triggering volcanic eruptions that lasted for 600,000 years.

The surge in volcanic activity coincided with one of Earth's big extinction events that is believed to have wiped out half of all species, including most of the large amphibians and around one-fifth of marine organisms.

Scientists reconstructed events surrounding the rise of the dinosaurs by examining evidence from fossilised animals and plants that lived and died in the volcanic onslaught.

A team led by Jessica Whiteside, a paleobiologist at Brown University, Rhode Island, focused on a massive lava flow known as the central Atlantic magmatic province, which covered more than 9m sq km. Regions of the ancient lava field, which flowed from volcanoes 201.4m years ago, are preserved in sediments in Newark and Hartford, in the north-eastern US.

Analysis of wood and ancient leaves recovered from the sediments suggests that atmospheric levels of greenhouse gases soared as volcanic activity increased. The effect on the environment was extraordinary. Ancient pollen residues revealed a mass extinction of plant life in which half of all flora species died out. This was followed by a rise in the growth of ferns, which are often the first plants to return in an environment ravaged by volcanic activity. Ferns can grow in dim lighting conditions, which can be caused when particles churned out by volcanoes block out natural light.

Animal fossils uncovered at the sites revealed a sharp fall in the population of crurotarsans, while theropod footprints became larger and more common as the dinosaurs grew in number and size. After the lava flows "the fossil record for crurotarsans is nearly completely gone", Whiteside said.

Why the early dinosaurs survived while the crurotarsans perished is not known, said Whiteside. "They had the blind luck of being unwittingly adapted to get through that climate catastrophe," she added. A report on the research appears in the US journal, Proceedings of the National Academy of Sciences.

"The big thing is many people have heard why dinosaurs went extinct, but the question why they came to be is much more interesting," Whiteside said.

Scientists had speculated that dinosaurs rose to prominence when an asteroid struck Earth and wiped out other species. Writing in the journal, Whiteside said the latest research was the "strongest case for a volcanic cause of a mass extinction to date".

Earth's five mass extinctions

The Cretaceous period ended 65m years ago with the death of the dinosaurs. Many scientists believe the Earth suffered a direct hit from an asteroid or that a comet could be to blame for the extinction.

The Triassic period ended 210m years ago with another mass extinction of land animals and sea creatures. A surge of volcanic activity released huge volumes of greenhouse gases and caused massive floods of lava.

At the end of the Permian period 250m years ago, between 80% and 96% of all living marine species were extinguished, along with 70% of land animals. The cause is unclear.

Near the end of the Devonian period, 370m years ago, many species of fish and 70% of marine invertebrates perished. The reason is unclear.

At the end of the Ordovician period, 440m years ago, a mass extinction event wiped out almost all corals and fish, and 25% of all families of creatures. The formation and subsequent melting of glaciers, which caused sea levels to fall and then rise, was the most probable cause.