John 16
Warning of persecution
These things have I spoken unto you, that ye should not be offended. They shall put you out of the synagogues: yea, the time cometh, that whosoever killeth you will think that he doeth God service. And these things will they do unto you, because they have not known the Father, nor me. But these things have I told you, that when the time shall come, ye may remember that I told you of them. And these things I said not unto you at the beginning, because I was with you.
Jesus tells the disciples why he is warning them: so they will not fall away. They will be expelled from synagogues, and some will kill them thinking they are serving God. He says he did not speak of this earlier because he was with them.
What does this mean?
"Be offended" (KJV) means to be made to stumble or lose faith. "Doeth God service" (KJV) means offers worship or service to God.
Historical context
Expulsion from the synagogue appears also at 9:22 and 12:42. Paul's letters describe how he once persecuted followers of Jesus out of zeal for God (Galatians 1:13-14), an example of the kind of opposition described here. Many scholars think these verses reflect conflicts experienced by the community behind John's Gospel.
Why does it matter?
Jesus' foreknowledge is meant to steady the disciples: when trouble comes, they will remember that he warned them. These verses complete the thought begun in 15:18.
Editorial notes, not scripture.