Numbers 23:29

And Balaam said unto Balak, Build me here seven altars, and prepare me here seven bullocks and seven rams.

The king of Moab repeatedly brought Balaam to different places in the hope that he would curse Israel. The request in the verse marks the third such attempt, made after the second failure left the king disheartened and distressed yet still holding faint hope.

For this attempt the king conducted Balaam to Mount Peor, where stood a temple noted above all for disgusting scenes of licentiousness enacted in honor of its god. There renewed preparations were made for pronouncing the curse, with the same number of altars erected as before and the same sacrifices offered, seven bullocks and seven rams. The repeated attempts to secure a curse failed.

On this occasion Balaam did not go alone as at other times to learn God's will and made no pretense of sorcery. Instead he stood by the altars looking around upon the widely spread tents of Israel, when the Spirit of God rested upon him and the divine message of blessing came from his lips.