With Saint Patrick’s Day approaching (March 17), people will be slurping minty green shakes, setting out pot-of-gold decorations and adorning themselves in every shade of lime, jade and Kelly green. Wearing green makes you invisible to the leprechauns, it is said. And if a leprechaun spots you not wearing green, you’ll get pinched. (My mom comes from an Irish family that loved to help the tiny, bearded fairies. She was an epic pincher.)

But of all the traditions and lore associated with Saint Patrick’s Day, one has always stood out: the story of how Saint Patrick drove all of Ireland’s snakes into the sea.

According to the legend, the religious man known as Saint Patrick traveled from Britain to Ireland to do missionary work in the fifth century. While he was there, he was attacked by a group of snakes. Serpents are a symbol of the devil in the Christian Bible, so Saint Patrick cleansed the Emerald Isle of “evil” by shooing every legless reptile he could find into the ocean.

It’s a fanciful tale, but could it be true? After all, Ireland is one of the few places on Earth where snakes can’t be found in the wild.

“The first thing you have to remember is that the way Ireland looks today is not the way it always looked,” says Jacquelyn Gill, an ice age ecologist at the University of Maine.

About 24,000 to 27,000 years ago, the entire island of Ireland was covered in ice. So were Scotland, Wales and most of England. Which means not only were there no snakes in Ireland, but there wasn’t much of anything else.

As the world warmed up and the glaciers receded about 10,000 to 12,000 years ago, plants and animals started to recolonize the islands from mainland Europe. Seeds blew on wind across an area of water called the English Channel or were carried by waves. Some animals were even able to swim across, Gill says. But early humans also played a role.

“As people started to settle in Ireland, they brought the plants and animals that they liked to hunt, and eat, and plant,” she says. “But snakes were not high on that list.”

Three species of snakes did manage to make the journey to Britain, including a venomous snake known as the adder. But the cold waters surrounding Ireland probably prevented any of these serpents from reaching the Emerald Isle. There are also sea snakes — reptiles that live their whole lives in the water — “but they tend to live in much warmer climates,” Gill says.

To make a long story short, Saint Patrick had nothing to do with Ireland’s snakelessness.

“They just ran up against this barrier,” Gill says about the seas surrounding the island nation. “And they had no bridges, no boats, no way to get over there. So that’s why there are no snakes in Ireland.”

Correction: An earlier version of this story stated that legend says that Patrick traveled from England to Ireland in the fifth century. The word England was not known to be used until several centuries after that time. Legend usually says he came from Britain. Historians disagree about whether he came from what is now England, Scotland or Wales.

Bittel is a freelance journalist who often writes about animals. His children’s book, “How to Talk to a Tiger . . . and Other Animals,” will be published in April.