Read 1 Chronicles 5:20 Using Other Translations
And they were helped against them, and the Hagarites were delivered into their hand, and all that were with them: for they cried to God in the battle, and he was intreated of them; because they put their trust in him.
And when they prevailed over them, the Hagrites and all who were with them were given into their hands, for they cried out to God in the battle, and he granted their urgent plea because they trusted in him.
They cried out to God during the battle, and he answered their prayer because they trusted in him. So the Hagrites and all their allies were defeated.