We'd all love to dismiss this story as mere fairy tale and pure fiction. However, scholars generally agree that something horrible happened in the town of Hamelin to spawn the story. Though there might not have been a piper with magical musical talents, we can safely assume that some tragedy ensued. And, as you might expect, the scholars are basing this on more evidence than just the Grimm brothers' story itself.
Supposedly, the people put up a stained glass window in their church around 1300 that depicted a group of children and a motley-clad fellow. On the glass was an inscription that read, "On the day of John and Paul 130 children in Hamelin went to Calvary and were brought through all kinds of danger to the Koppen mountain and lost" [source: Zipes]. Interestingly, this inscription didn't mention anything about a piper. Accounts of the window have been found, but the window itself seems to have been destroyed.
In what's known as the Lüneburg Manuscript, which was written more than a century after the window is thought to have been constructed, a monk by the name of Heinrich of Herferd gives an account of what happened. He wrote that a man who was about 30 years old came to the town playing a flute and led the children out [source: Zipes]. By 1603, the town erected the façade of what's known now as the Pied Piper House. On the façade, there's an inscription similar to the one that was reputedly etched on the window -- but this one explicitly mentions a pied piper.
But the suggestion of rats having anything to do with the tragedy didn't come until later. It's not too far-fetched that rats would be connected to the incident; rat infestations were certainly a problem around the 13th century and ratcatcher was a common profession.
So what do historians really think could have happened on that fateful day?