When Judah looked back
"When the soldiers of Judah looked back"
behold
This word shows that the soldiers were surprised by what they saw.
the fighting was both in front of them and behind them
"the army of Israel was fighting them from the front and from the back"