In the second chapter of Esther, we find Mordecai sitting at the king's gate when he overheard a plot to kill the king. He told Queen Esther, who reported it to the king, giving credit to Mordecai.