When Pashhur, who was the leading priest responsible for the oversight of the temple, heard Jeremiah"s words, he ordered him beaten and imprisoned in stocks that stood near the Benjamin Gate. This gate was evidently the new gate into the inner temple courtyard that King Jotham had constructed (cf. 2 Kings 15:35). It provided an entrance from the north, in which direction the tribal territory of Benjamin lay. Consequently many people would have seen Jeremiah there. [source][source][source]
"The "stocks," where the prophet was confined, were intended not only for restraint but also for torture. The stocks, which were used for false prophets (cf. 2 Chronicles 16:10), held the feet, hands, and neck so that the body was almost doubled up (cf. Jeremiah 29:26). The Hebrew word for "stocks" (mahpeketh) means "causing distortion."" [1][source]
Ironically, this overseer in God"s temple, evidently the man in charge of preserving order in the courtyard, was taking action against God"s overseer of the nations, Jeremiah (cf. Jeremiah 1:10). This is the first recorded act of violence done to Jeremiah. It reminds us of the captain of the temple guard who, years later, similarly imprisoned Peter and John ( Acts 4:1-3). [source][source][source]