Concerning this salvation, the prophets sought and searched diligently, who prophesied of the grace that would come to you,
Paul tells us in Ephesians 1:0 that "we were chosen in Him before the foundation of the world" ( Ephesians 1:4 ). Here election is according to the foreknowledge of God.