According to the legend, silver had been stolen from a landowner in Barcelos, and the inhabitants of that city were looking for the criminal who had committed the crime. One day, a man from neighboring 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 Galician and condemned him to hang. The man asked them to take him in front of the judge who had condemned him. The authorities honored his request and took him to the house of the magistrate, who was holding a banquet with some friends. Affirming his innocence, the Galician pointed to a roasted cock on top of the banquet table and exclaimed, "It is as certain that I am innocent as it is certain that this rooster will crow when they hang me." The judge pushed aside his plate because he decided to not eat the rooster. But still, the judge ignored the Galician's appeal.

However, while the pilgrim was being hanged, the roasted rooster stood up on the table and crowed as the Galician predicted. Understanding his error, the judge ran to the gallows, only to discover that the Galician had been saved from hanging thanks to a poorly made knot in the rope. The man was immediately freed and sent off in peace.