The earliest mention of the story seems to have been on a stained-glass window placed in the Church of Hamelin c. 1300.
This window is generally considered to have been created in memory of a tragic historical event for the town.