The Tailor Who Sold His Soul to the Devil is a Mexican fairy tale collected by Vicente T. Medoza and Virginia Rodriguez Rivera de Mendoza in Piedra Gorda.[1]
It is Aarne–Thompson type 1096, The tailor and the ogre in a sewing contest.[1]
The Devil offers a tailor a bargain; the tailor says he can have his soul if he beats him in a sewing contest. The Devil uses a long thread, which tangles; the tailors uses a short one and wins.
The story concludes with the observation that this is why mothers warn their daughters against long threads by calling them "the Devil's thread."[2]