The Bible does say, however, that the complete rejection of the fourth commandment was the major cause of allowing His people to be conquered and taken into captivity by the king of Babylon (which began in 586 B.C.). God, through the prophet Jeremiah (Jeremiah 17), warned the people of Jerusalem, Judah and their kings that he would punish anyone breaking His Holy Sabbath. The Eternal also stated, through the prophet Ezekiel, while the ancient Israelites ultimately went into captivity.
18 Instead, I (God) warned the young people (the children of those who disobeyed God after leaving Egypt and who died in the wilderness) among them: 20 Make the Sabbath a holy day, so that it will be a sign of the covenant we made, and will remind you that I am the Lord your God.
21 But that generation also defied me. They broke my laws and did not keep my commands, which bring life to anyone who obeys them.
23 So I made another vow in the desert. I vowed that I would scatter them all over the world. 24 I did this because they had rejected my commands, broken my laws, profaned the Sabbath . . . (Ezekiel 20)
The prophet Daniel not only knew of but also responded to Jeremiah's warning of Sabbath-breaking (Daniel 9). Since Daniel was considered by God to be one of the most righteous people (Ezekiel 14:14) he surely kept the Sabbath day. He was not the only one, however, to heed the warnings of the Old Testament prophets. Nehemiah, a leader in Jerusalem of those who had come back from living as captives, stressed observing the Sabbath correctly in the 13th chapter of his book. He knew that the breaking of the fourth commandment played a role in the Israelites being thrown out of the Promised Land (Nehemiah 13:15-18).
Keeping the day of rest would have aided those in captivity to maintain their identity as God's people in the middle of a pagan people. Those who disregarded God's Sabbath law lost their lifeline to the Creator and soon became caught up in the godless culture in which they lived. Thankfully, a few communities obedient to God's way and to his Sabbath rest did form in the captive places the Israelites called home.
A story is told, written before the second century B.C., about a man named Tobit who encapsulated the values of faithful Israelites in foreign lands. He was one of the many who were early captives of the Assyrian empire which took the northern ten tribes of Israel out of Palestine. He kept the holy day known as Pentecost as part of his obedient lifestyle while a captive. Ultimately, the fact that Israelites (the Kingdom of Judah) as a whole kept their identity even while living in foreign lands is likely the best evidence of keeping the Sabbath while captive.