God appointed judges to lead the people of Israel in times of trouble after they entered the Promised Land and before they had kings. Often judges rescued the Israelites from their enemies.
The word "danger" refers to enemies that tried to harm the people of Israel. AT: "He also delivered the people of Israel from their enemies" (See: [[rc://en/ta/man/translate/figs-metonymy]])