According to the tale, a landowner in Barcelos had silver stolen and the inhabitants of that city were looking for the person who had committed the crime. One day, a man from Galicia turned up and became suspect, despite his pleas of innocence. The Galician swore that he was merely passing through Barcelos on a Pilgrimage to Santiago de Compostela to complete a promise.
Nevertheless, the authorities arrested the man and condemned him to hang. The man asked them to take him in front of the judge who had condemned him. The authorities honoured his request and took him to the house of the magistrate, who was holding a banquet with some friends. Affirming his innocence, the man pointed to a roasted rooster on top of the banquet table and exclaimed, "It is as certain that I am innocent as that rooster will crow when they hang me." The judge pushed aside his plate, deciding not eat the rooster, but otherwise ignored the appeal.
However, while the pilgrim was being hanged, the roasted rooster stood up on the table and crowed as predicted. Understanding his error, the judge ran to the gallows, to discover that the man had been saved from being hanged thanks to a poorly made knot in the rope. The man was immediately freed and sent off in peace.