And I say unto you, you are Peter, and upon this rock I will build my church; and the gates of Hades shall not prevail against it. I will give unto you the keys of the kingdom of heaven.” – Matthew 16:18-19a
Peter was given “the keys of the kingdom” — the keys of the Church. He was to open the door to three groups of people living in his day: the Jews, the Samaritans, and the Gentiles. Once, he opened the door to that particular group, it stayed open for that group.
The first time Peter used the keys was when he opened the door of the Church to the Jews in Acts 2. He preached his first sermon after being baptised by the Holy Spirit, and many Jews believed. It is by Spirit baptism that the Church, the Body of the Messiah, came into being (1 Corinthians. 12:13). So in Acts 2, Peter opened the door of the Church to the Jews and, from then on, it stayed open for the Jewish people.
Next, he opened the door for the Samaritans in Acts 8. Although Philip preached the gospel to the Samaritans, and many of them believed and were baptised by water, none were baptised by the Holy Spirit. The reason was because Philip did not have the keys. When the Jerusalem Church sent Peter to Samaria, he laid his hands on the Samaritans and they were baptised by the Holy Spirit; they were then able to enter into the Body of the Messiah. From then on, the door stayed open for the Samaritans.
Finally, Peter opened the door for the Gentiles in Acts 10. Paul was saved and commissioned to be the apostle to the Gentiles in Acts 9, but he also did not have the keys, and the door of the Church was not yet opened for the Gentiles at that point. In Acts 10, Peter preached the gospel to the House of Cornelius, a house of Gentiles. As he was preaching, they believed his message, were baptised by the Holy Spirit into the Body, and became members of the Church. From then on, the door stayed open to Gentiles and the way was open for Paul to finally fulfill his commission.
Peter had the keys, which meant that he was responsible for opening the door: first to the Jews, which he fulfilled in Acts 2; then to the Samaritans, which he fulfilled in Acts 8; and then to the Gentiles, which he fulfilled in Acts 10.