You might picture a modern brown rat darting under a dinosaur’s feet, but that image is not quite right.
Modern rats did not live alongside dinosaurs, although some small mammal relatives did.

That difference matters because “rat” can mean a very specific animal today.
Your answer changes depending on whether you mean the modern genus Rattus or a rat-like early mammal living in the Mesozoic world.
The Short Answer: Modern Rats Vs. Rat-Like Mammals

The modern rat belongs to a much later branch of mammals.
Early mammals did live during the Mesozoic Era alongside dinosaurs, but they were not true rats in the modern sense.
What Scientists Mean By Rat
When scientists say “rat,” they usually mean members of the genus Rattus.
That group appeared long after the age of dinosaurs ended.
Why The Answer Is No For Rattus
The Rattus lineage appeared much later than dinosaur extinction.
So if you mean today’s city rat or brown rat, the answer is no.
What Lived Alongside Dinosaurs Instead

Dinosaurs shared their world with many small animals.
Tiny mammals, insects, birds, pterosaurs, fish, and other life forms lived in the same ecosystems.
Multituberculates And Other Small Mammals
One major mammal group from that time was the multituberculates.
They were small, adaptable, and often filled roles that helped them avoid direct competition with dinosaurs.
Examples Like Rugosodon And Life 160 Million Years Ago
Fossils such as Rugosodon show that mammal relatives lived as far back as 160 million years ago in the late Jurassic.
A well-preserved rat-like fossil from the dinosaur age gives you a vivid picture of these small survivors moving through forests full of dinosaurs.
How These Mammals Survived Among Reptiles
These mammals likely stayed small, nocturnal, and flexible in diet.
That made it easier for them to live around reptiles, lizards, amphibians, crocodiles, and alligators while also using forests, rivers, oceans, and other habitats.
How Mammals Eventually Led To Modern Rodents And Primates

The mammals you know today came from these earlier lineages.
Rodents, primates, and many other groups expanded into new ecological roles after the dinosaurs disappeared.
From Early Mammals To Rodent Ancestors
Early mammals were not modern mice or rats.
They were part of the evolutionary path that eventually produced rodents.
After the dinosaur extinction, rodent ancestors spread and diversified in a major way.
Where Purgatorius Fits In
Purgatorius is often discussed as an early primate-like mammal close to the roots of primates.
Along with other early placentals, it shows how small mammals eventually gave rise to branches that later included primates, elephants, cats, dogs, bears, dolphins, whales, mammoths, and neanderthals.
Why Cats, Dogs, Whales, And Humans Came Much Later
Those familiar mammals are all far removed from the dinosaur era.
Many major mammal groups, including rodents and primates, rose after dinosaurs were gone.
Why This Prehistoric Mix-Up Happens

The confusion comes from appearances.
Some ancient mammals had features that look rat-like, which makes them easy to picture beside dinosaurs.
Rat-Like Appearance Vs. True Relationship
A small body, pointed snout, and long tail can make an animal look like a rat even when it is not one.
Those features are shared shapes, not proof of a close relationship, and they can also show up in unrelated mammals facing similar survival pressures.
How Fossils And New Research Shape The Picture
Newly discovered and dated fossils change the story.
Researchers now have a clearer view of small mammals living with dinosaurs.
Studies of evolutionary timing help place modern rats, primates, and other mammals much later in the timeline.