Jeremiah 32:2-3 NLT

2 Jerusalem was under siege from the Babylonian army, and Jeremiah was imprisoned in the courtyard of the guard in the royal palace.
3 King Zedekiah had put him there because he continued to give this prophecy: "This is what the LORD says: I am about to hand this city over to the king of Babylon.