During the darkest times, Hashem sent Mordechai to shine a light and renew people's faith. His battle wasn't limited to the physical and the natural. As a first step, he strengthened the Torah education of Jewish children and gathered the people to return to Hashem. The darkest part of the Egyptian exile caused Hashem to send Moshe Rabbeinu (Moses) into the world.