The army of the king of Babylon was then besieging Jerusalem, and Jeremiah the prophet was confined in the courtyard of the guard in the royal palace of Judah.