Trapped on the battlefield, the men of Judah face an immediate crisis as enemy warriors close in on them from both the front and the rear [מצודת דוד, ביאור שטיינזלץ]. In response to this severe distress, they take coordinated action.
They cry out with a plea carefully composed to awaken divine mercy and bring about salvation. This appeal relies on three core elements: a direct prayer to God, the active presence of the priests, and the sounding of an alarm. The priests blast this alarm to signal their distress [מצודת דוד, ביאור שטיינזלץ]. Even though the act of sounding an alarm naturally implies the instrument used, trumpets are explicitly utilized to emphasize the urgency of the moment [מצודת דוד].
Ultimately, it is this powerful combination of sincere prayer, priestly involvement, and the blast of the trumpets that leads to their victory through the power of God [מלבי״ם].