This is the context from song of Deborah and Barak:
6 “In the days of Shamgar, son of Anath,
in the days of Jael, the highways were abandoned,
and travellers kept to the byways.
7 The villagers ceased in Israel;
they ceased to be until I arose;
I, Deborah, arose as a mother in Israel.
8 When new gods were chosen,
then war was in the gates.
Was shield or spear to be seen
among forty thousand in Israel?
9 My heart goes out to the commanders of Israel
who offered themselves willingly among the people.
Bless the Lord (Judges 5:6-9 ESV)
There has been a little divergence on this verse since ancient times. The Jewish Greek Old Testament has “they chose new gods” (idols) which is confirmed by Deuteronomy 32:16-17. However two early Christian translations had “God chose new things” (Peshitta) or “God chose new wars” (nova bella elegit Dominus, Vulgate), neither of which are possible with the Hebrew text.
They sacrificed to demons (sheddim) that were no gods, to gods they had never known, to new gods that had come recently, whom your fathers had never dreaded. (Deuteronomy 32:17)
The German orientalist Ernest Ewald (1812-1888) suggested that “gods” should be rendered “judges”, following the Greek Septuagint treatment of the famous “elohim” verses in Exodus 21:6, 22:7-8 – but Ewald’s suggestion has never been accepted by any translator in this verse and in any case “judges” for “elohim” has now been rejected by translators for Exodus 21:6; 22:7-8 for over a century.