All four evangelists recorded three denials, but the details differ slightly.
26:69-70 Peter was warming himself near the fire in the center of the courtyard (Mark 14:65; Luke 22:55; John 18:18). The servant girl's words expressed both curiosity and accusation. She referred to Jesus derogatorily as "the Galilean"(cf. Mark 14:67). Residents of Judea, and especially Jerusalem, regarded Galileans as inferior to themselves because the area was mainly rural. Evidently several people overheard her comment and may have joined in her questioning. Peter replied with words similar to a formal legal oath.1035
26:71-72 Peter withdrew to the gateway leading from the street into the courtyard perhaps because that area was darker and there were fewer people there. There another girl pointed him out to others standing about as one who had been with Jesus "of Nazareth,"another derogatory slur in view of the bad reputation of Nazareth. Peter denied her accusation this time with an oath. Matthew did not mean that Peter used profanity, but he invoked a curse on himself if he was lying. He appealed to something sacred to confirm his truthfulness (cf. 5:33-34; 23:16-22).
26:73-75 A third person, one of the high priest's servants who was a relative of the man whose ear Peter had cut off in Gethsemane (John 18:26), approached Peter with some bystanders about an hour later (Luke 22:59). They accusingly asked Peter again if he was not one of Jesus' disciples since he was a Galilean. Galileans had an accent that set them off as distinctive.1036This shows how thoroughly residents of Jerusalem connected Jesus' ministry with Galilee since it was the site of most of His activity. Most if not all of His disciples were Galileans.1037Peter denied that he knew Jesus a third time using more oaths to confirm his testimony. Immediately a rooster crowed. Peter heard it and remembered Jesus' prediction that he would deny Jesus before the cock crowed (v. 34). Peter left the courtyard and wept bitterly over his cowardice and failure. This is Matthew's last reference to Peter.
Matthew probably recorded this incident because it illustrates Jesus' ability to foretell the future, a messianic characteristic. It also reveals the weakness of the disciples whom Jesus had taken such pains to prepare for His passion but without success. Their concept of the Messiah and the kingdom was still largely that of most people in Israel then, though they had come to recognize Jesus as God. Only Jesus' resurrection would clarify their understanding of His messiahship and kingdom program.