The first dinosaur-like creatures emerged up to nine million years earlier than previously thought.
That is the conclusion of a study on footprints found in 250 million-year-old rocks from Poland.
Writing in a Royal Society journal, a team has named the creature that made them Prorotodactylus.
The prints are small - measuring a few centimetres in length - which suggests the earliest dinosaur-like animals were about the size of domestic cats.
They would have weighed at most a kilogram or two, they walked on four legs and they were very rare animals.
Their footprints comprised only two or three per cent of the total footprints on this site.
The footprints date to just two million years after the end-Permian mass extinction - the worst mass extinction in the history of the planet.
According to Stephen Brusatte, from the American Museum of Natural History in New York, who led the research: "In geological terms this is just the blink of an eye."
He told BBC News: "We can basically say that the dinosaur lineage originated in the immediate aftermath of this extinction which is a completely new idea and a very radical re-interpretation of the early history of dinosaurs".
In the end-Permian extinction event, more than 90% of all life on Earth was wiped out due to massive volcanic eruptions, sudden global warming and the stagnation of the oceans.
Up until recently, scientists had thought that dinosaurs emerged 15 to 20 million years after the mass extinction, when the planet had become more habitable.
But the new footprints suggest that the rise of dinosaurs was intimately related to the devastating extinction event.
"Without this mass extinction there would never have been dinosaurs," said Mr Brusatte.
"There's a degree of symmetry about that because when dinosaurs went extinct 65 million years ago, that opened space for mammals," he added.
Although the footprints are characteristic of dinosaur-like creatures, they do not provide the absolute proof that a fossilised skeleton would.
"We'd rather have a skeleton because footprints are a little open to interpretation," Professor Mike Benton, from Bristol University, told BBC News.
He believes that the discovery is important - but he says it would have been published in one of the top two scientific journals in the world if Mr Brusatte had been able to provide further evidence for his claim.
"I bet you if (he had found) a skeleton which was unequivocal it would have been a front page."
The findings are published in Proceedings of the Royal Society B: Biological Sciences.