2 Samuel 10:9-19

9 When Joab saw that the front of the battle line was against him before and behind, he chose from all the choice men of Israel and put them in array against the Syrians;
10 and the rest of the people he delivered into the hand of Abishai his brother, that he might put them in array against the children of Ammon.
11 And he said, "If the Syrians be too strong for me, then thou shalt help me; but if the children of Ammon be too strong for thee, then I will come and help thee.
12 Be of good courage, and let us play the man for our people and for the cities of our God; and the LORD do that which seemeth to Him good."
13 And Joab drew nigh, and the people who were with him, unto the battle against the Syrians; and they fled before him.
14 And when the children of Ammon saw that the Syrians had fled, then fled they also before Abishai and entered into the city. So Joab returned from the children of Ammon, and came to Jerusalem.
15 And when the Syrians saw that they were smitten before Israel, they gathered themselves together.
16 And Hadadezer sent and brought out the Syrians who were beyond the river, and they came to Helam; and Shobach the captain of the host of Hadadezer went before them.
17 And when it was told David, he gathered all Israel together and passed over the Jordan and came to Helam. And the Syrians set themselves in array against David, and fought with him.
18 And the Syrians fled before Israel; and David slew the men of seven hundred chariots of the Syrians and forty thousand horsemen, and smote Shobach the captain of their host, who died there.
19 And when all the kings who were servants to Hadadezer saw that they were smitten before Israel, they made peace with Israel and served them. So the Syrians feared to help the children of Ammon any more.