Jesus told the disciples that they would scatter when they "strike the Shepherd". Peter said, "Though they all fall away because of You, I will never fall away."
Was this pride, or ignorance of the power of darkness, or both, or something else that prompted Peter to say this?
Maybe he sincerely believed he would be steadfast and didn't think fear would defeat his resolve?
Maybe he underestimated the intensity of the events that would unfold?