Numbers 22:11
Behold, there is a people come out of Egypt, which covereth the face of the earth: come now, curse me them; peradventure I shall be able to overcome them, and drive them out. Behold, there is a people come out of Egypt, which covereth the face of the earth: come now, curse me them; peradventure I shall be able to overcome them, and drive them out.
Balak son of Zippor, king of Moab, sent messengers to Balaam with the word that a people had come out of Egypt covering the face of the earth and spreading across the land, and asked him to come and curse them so that Balak and Moab might be able to defeat and overcome them and drive them out and away. Balaam repeated this message to God in the night when he inquired of the Lord. The request arose because Moab feared Israel's victories and saw Israel as a threat, and judging an attack by force to be hopeless, turned to sorcery and sought to use a curse and magic to overcome Israel.
Balaam very well knew what answer to give, but he was double-minded, professing to be a prophet of God while pursuing favor, honor and rewards from the enemies of the Lord. Having once been a prophet of God and a good man, he had apostatized and given himself up to covetousness, loving the wages of unrighteousness, and with his covetous disposition excited by the presents in the messengers' hands, he asked them to tarry that night while he inquired of the Lord. God came to Balaam in the night through an angel and asked what men were with him.
God's answer forbade Balaam to go with the men and to curse the people, because they are blessed and conducted under the banner of the God of Heaven, and no curse from man could retard their progress, and angels prevented Balaam from carrying out the curse. In the morning Balaam reluctantly told the men to return because the Lord would not suffer him to go with them. Balak conducted Balaam from one point to another in the vain hope that he might be induced to change the blessing of Israel into a curse.
Balaam's course shows bringing selfishness and covetousness into God's work and acting contrary to God, and warns that self-directed plans can hinder the Lord's work. The verse is echoed in the warning that dignitaries would be called upon to curse God's people and might boast of their own power, but God has supreme authority and His people are to pray.