Sanjuansaurus gordilloi is a very primitive dinosaur from the late Triassic period in Argentina. During the Triassic, large agile crocodiles were the dominant terrestrial predators. Early dinosaurs, still very lizard-like with their small hands, four-toed feet, and general lack of diversification into the fantastic body shapes later eras saw, were prey more often than predators. They were small and unimpressive, and scampered about searching for insects and other small reptiles to eat.
Sanjuansaurus' habitat was, at the time, volcanically active. While much of it was covered by forests, fresh lava flows occurred regularly. Small, mobile predators like Sanjuansaurus might have been able to take advantage of these dramatically-altered ecosystems and hunt between the rocks for early colonizers such as spiders and lizards.