He has told us beforehand
I have told you these things so that you won't abandon your faith. For you will be expelled from the synagogues, and the time is coming when those who kill you will think they are doing a holy service for God. This is because they have never known the Father or me. Yes, I'm telling you these things now, so that when they happen, you will remember my warning. (John 16:1-4)
Within these verses, Christ warns us of difficulties that his own will face in this life. Though doing good, His own will be persecuted and the pursuers will think they are doing a good service to God! From this text it is clear that persecution will amount from religious people who know about God, but who do know Him. Yet, to those who do know Him, He has bought them with His own blood.