It was God.
2 Samuel 22:32–43 (ESV)
“For who is God, but the LORD?
And who is a rock, except our God?
This God is my strong refuge
and has made my way blameless.
He made my feet like the feet of a deer
and set me secure on the heights.
He trains my hands for war,
so that my arms can bend a bow of bronze.
You have given me the shield of your salvation,
and your gentleness made me great.
You gave a wide place for my steps under me,
and my feet did not slip;
I pursued my enemies and destroyed them,
and did not turn back until they were consumed.
I consumed them; I thrust them through, so that they did not rise;
they fell under my feet.
For you equipped me with strength for the battle;
you made those who rise against me sink under me.
You made my enemies turn their backs to me,
those who hated me, and I destroyed them.
They looked, but there was none to save;
they cried to the LORD, but he did not answer them.
I beat them fine as the dust of the earth;
I crushed them and stamped them down like the mire of the streets.”
This passage starts off with a strong statement of monotheism. The LORD (יְהוָ֑ה, Yahweh) isn’t merely the most powerful God; He’s the only God. That’s what the first commandment is driving at.
“You shall have no other gods before me.” — Exodus 20:3 (ESV)
The Hebrew that’s translated as, “before me” (עַל־פָּנָֽ֗יַ, al pe-na-ya) is literally, “upon my face.”
Then David completes his point about righteousness by faith.
It was God who has made my way blameless.
It was God that made him capable—even to bend a bow of bronze (which would be impossible). The LORD did it all. He made David strong and He made his enemies weak. The result was total victory.
I beat them fine as the dust of the earth;
I crushed them and stamped them down like the mire of the streets.