Jeremiah 38:8

Ebed-melech went forth out of the king’s house, and spake to the king, saying,

The verse comes at the moment when enraged rulers demanded Jeremiah's death for predicting calamity and weakening the people, and the cowardly Zedekiah, though knowing the charges were false, surrendered him into their hands to please men in high position rather than openly show faith. His imprisonment in the pit was unjust, suffered for faithful integrity in doing right. He had been let down with cords into the dungeon of Malchiah in the court of the prison. That dungeon was a dark pit with no water but mire and mud, in which he sank.

Ebed-melech went forth out of the king's house and spoke directly to the king, beginning his appeal and intervention on Jeremiah's behalf. God raised up friends for Jeremiah and did not forget him in distress, but provided help through another person and arranged for him to be brought out of the pit back to the court of the prison, with his cause finding favor with princes. Suffering for doing right did not mean God had forsaken him.