And Balaam lifted up his eyes, and he saw Israel abiding in his tents according to their tribes; and the spirit of God came upon him.
When Balaam looked up and saw Israel encamped tribe by tribe, the Spirit of God came upon him,
Read Numbers 24