A childless king and queen pledged to St. James that if they had a son, he would make a pilgrimage on his eighteenth birthday. They had a son. When he was twelve, his father died. When his eighteenth birthday grew near, the queen grieved over the thought of not seeing him for a year; she tried to put her son off, but when his consolations for her pretended causes did not work, she had to reveal the truth. He assured her that he would return.
The queen gave him apples and told him that he needed a companion, but he should invite any prospect to eat with him, and then he should cut an apple into two unequal parts and reject anyone who did not take the smaller. He met three young men, each of whom also claimed to be going on a pilgrimage to the shrine of St. James, but the first two wanted the larger part, and the prince feigned illness to be rid of them. The third took the smaller, and they traveled together, having pledged that if one died, the other would bring his body. It took them a year to reach the shrine. At one point, they hired a house to rest before they continued.
The king saw them, thought them both handsome but the prince the handsomer, and resolved to marry his daughter to the prince. He invited them both to dinner, and poisoned the friend, thinking that would keep the prince from travelling on. Instead, the prince instantly resolved to go on. The king offered his daughter, but the prince went on, and brought his friend's body with him. The friend was not dead, only sleeping, and when the prince had reached the shrine, he prayed the friend be restored to life, and he was.
They returned to the king, and the prince married his daughter. The prince, after a time, declared that he had to return home. The king hated the friend and sent him off with a message, telling him the prince would wait; then he got the prince to leave, assuring him the friend could catch him, he would give him a good horse. When the friend returned, the king sent him after the prince on foot. He was exhausted when he reached the prince, so the prince tended to him like a brother and brought him home. However, no doctor was able to cure him.
The prince's wife gave birth to a daughter.
One day, a strange old man arrived, and the queen brought him to the friend. He declared that the man could be restored by the daughter's blood. The prince was horror-struck, but since he had declared he would treat his friend as his brother, he did it. The friend was restored, but the daughter lay in her cradle as if dead. The old man returned, revealed he was St. James of Lizia, and restored the girl.