The first of these periods lasted from 1350 to 586 BCE, and encompassed the periods of the Judges , the United Monarchy , and the Divided Monarchy of the Kingdoms of Israel and Judah , ending with the destruction of the First Temple .