66 While Peter was below in the courtyard, one of the servant girls of the high priest came by.
67 When she saw Peter warming himself, she looked closely at him. “You also were with that Nazarene, Jesus,” she said.
68 But he denied it. “I don’t know or understand what you’re talking about,” he said, and went out into the entryway.
69 When the servant girl saw him there, she said again to those standing around, “This fellow is one of them.” 70 Again he denied it. After a little while, those standing near said to Peter, “Surely you are one of them, for you are a Galilean.”
71 He began to call down curses, and he swore to them, “I don’t know this man you’re talking about.” – Mark 14:66:71
In the above passage, we read that Peter was waiting anxiously in the courtyard. Peter is approached by a ‘girl’, and questions him by saying, ‘You also were with that Nazarene, Jesus’, implying to Peter that he was one of Jesus’s disciples. But, instead of Peter responding back by saying that he indeed is the friend of Jesus, he denies this. The purpose of Peter for lying here was to protect himself. The third time he was told by the people near him that he is one of Jesus’s disciples, Peter got so enraged he started cursing and swearing at them. What struck me in this story is how neither YHWH nor the disciples correct him for this falsehood. Peter was one of the disciples of Jesus. There is no doubt about this.
Bridgeway Bible Commentary
While Jesus was before Caiaphas and the other Jewish leaders inside the building, Peter sat in the courtyard, waiting anxiously. When a servant girl recognized him as a follower of Jesus, he denied any association with him (Matthew 26:69-70; Luke 22:55-57). A little later another person recognized him and told the people standing by, but again he disowned Jesus, this time with an oath (Matthew 26:71-72; Luke 22:58).
About an hour later some of the bystanders approached Peter again, convinced he was a follower of Jesus, but Peter’s denial was even stronger than before. The crowing of a cock indicated to all that daylight was approaching. It also reminded Peter of his folly in boasting that he could never fail. Just then Jesus happened to see Peter in the courtyard, and as their eyes met Peter was overcome with grief and went away weeping bitterly. 
Coffman’s Commentaries on the Bible
One may well sympathize with Peter. It was none of that maid’s business whether Peter was or was not a disciple of Jesus; and Peter’s purpose was clearly that of observing the proceedings unrecognized; but now this nosey maid was blabbering about his being a follower of Jesus. It is evident that Peter only wanted to get her to shut up. It was thus only a little deception that he proposed at first; but once a leak in the dyke appeared, the flood quickly overwhelmed him.
Peter tried to avoid further questioning by going out on the porch; but the maid saw him. As the devil’s particular servant in that hour, she made it her business to run him down and pin the truth on him.
Hearing the cock crow while he was on the porch did not help Peter’s nerves at all; and he returned to the unequal contest with the maid. She, on her part, sounded the alarm and appealed to everybody present. From John, it is plain that a relative of Malchus whose ear Peter had cut off was in the assemblage, and he took up the questioning also. This explains the fear and panic which came upon Peter and issued in his triple denial of the Lord. 
Arno Gaebelein’s Annotated Bible
Peter’s denial, Mark 14:66-72
The Lord had given the true testimony and Peter followed with his shameful denial. Mark gives what the other two evangelists omit, the cock crowing twice. The lessons from Peter’s fall are simple. He had to pass through this terrible experience to become broken down and learn to know his own weakness. And how we all need to know that we are in ourselves good for nothing; “in my flesh there dwelleth no good thing. 
The Popular Commentary by Paul E. Kretzmann
Beneath in the court Peter was; the session of the Sanhedrin was held in an upper room. He was sitting at the fire, where the light from the flames brought out his features very plainly. Now one of the maids of the high priest, the janitress that had admitted Peter into the vestibule, walking past the fire and seeing Peter sitting there and warming himself, had a good chance to observe his features. She promptly pointed him out to the rest of the servants, accusing him of belonging to the party of this Jesus of Nazareth. The matter rather took Peter by surprise; he may have thought himself secure, since he had been admitted to the court. But he thinks himself quick-witted in feigning lack of understanding: I neither know nor understand what thou sayest. It was a lie and a denial of his Lord, as Peter should have felt at once. As a matter of fact, his conscience seems to have been a little uneasy, for he now left his place by the fire and went out into the arched doorway, in the shadow of the portico. 
 Bridgeway Bible Commentary
 Coffman’s Commentary on the Bible
 Arno Gaebelein’s Annotated Bible
 The Popular Commentary by Paul E. Kretzmann