At the Last Supper Jesus predicted Peter would deny knowing him, something which Peter strongly refuted. However, the predicted event occurred just a few hours later.
After Jesus was arrested, Peter followed at a distance. He was in the courtyard of the high priest’s house during Jesus’ trial before the Sanhedrin inside.
It is here that he was recognised by some people. The first person who approached him was a woman who was a servant of the high priest, she had seen him with Jesus.
Peter replies that he doesn’t know what she is talking about. The woman then says to those around her, again he denies knowing Jesus.
Finally, the bystanders accused him as they recognised him as a Galilean from his accent.
On all three occasions he denied knowing Jesus - just as Jesus himself had predicted.
When Peter heard the cock crowing, he remembered Jesus’ words and broke down and cried.