2 Chronicles 36:20
And them that had escaped from the sword carried he away to Babylon; where they were servants to him and his sons until the reign of the kingdom of Persia: And them that had escaped from the sword carried he away to Babylon; where they were servants to him and his sons until the reign of the kingdom of Persia:
The verse describes the final overthrow of Jerusalem by Nebuchadnezzar, when many who had escaped the horrors of the long siege perished by the sword. Of those who still remained, the chief of the priests and the officers and the princes of the realm were taken to Babylon and executed as traitors. Those who survived the sword were carried captive to Babylon to live in servitude to Nebuchadnezzar and to his sons, serving the Babylonian kings until the reign of the kingdom of Persia. This servitude fulfilled the word of the Lord spoken by Jeremiah, fulfilling the warning of what would come when God's people departed from Him.
Only a feeble remnant of certain poor of the land was left to be vinedressers and husbandmen under Gedaliah, whom the Babylonians set over them as governor. Jeremiah, when released from prison by the Babylonian officers, chose to stay with that remnant. After Gedaliah was treacherously slain a few months later, the poor people went through many trials and were persuaded by their leaders to take refuge in Egypt. Though Jeremiah pleaded with them not to go into Egypt, they disobeyed the voice of the Lord, and all the remnant of Judah, men and women and children, went to Tahpanhes in Egypt.
Alongside this Babylonian captivity stands the later flight to Egypt: those who rejected God's counsel there faced judgment, while a small number who escaped the sword would return from Egypt to Judah. The destruction of Jerusalem and the captivity came because of Israel's transgression and wickedness. The exile followed their failure to serve as God's missionaries and their separation from the surrounding peoples. God used their scattering to carry knowledge of His truth to the world and to other lands.
They remained under foreign rule until God brought them back to their own land when they were loyal, true, and submissive. The captivity was connected with the destruction of the temple, and before the temple was destroyed the sacred ark containing the stone tables was hidden in a cave and was not restored to Israel.