As Egypt and Babylon vied for control of Palestine, Jehoiakim switched loyalties, serving both empires in turn as vassal king. When he died in about 598/597 B.C.E., during one of Nebuchadnezzar’s campaigns in Palestine, Jehoiachin came to the throne. Within a year, Jehoiachin was exiled to Babylon, and Zedekiah, the last puppet king of Judah, was placed on the throne. Zedekiah, too, would rebel against Babylon—probably under Egypt’s influence. His reign ended in 586 B.C., when Babylon destroyed Jerusalem.