Ha was said to protect Egypt from enemies such as invading ancient Libyans.[1] He is associated with Set, since Set represented the west of the Nile and they both have similar attributes - the desert.
^Wilkinson, Richard H. (2003). The Complete Gods and Goddesses of Ancient Egypt. Thames & Hudson. p. 106