This refers to the Israelite soldiers who were there.
# they were discouraged and greatly afraid
The words "discouraged" and "greatly afraid" mean basically the same thing and emphasize the intensity of their fear. (See: [[rc://en/ta/man/translate/figs-doublet]])