Strangely, one of the earliest detailed prophecies of the Messiah came through Balaam, the prophet who was rebuked by his donkey. When Balak was attempting to get Balaam to curse Israel, the wayward prophet uttered these words instead:
And now, behold, I go unto my people: come therefore, and I will advertise thee what this people shall do to thy people in the latter days. And he took up his parable, and said, Balaam the son of Beor hath said, and the man whose eyes are open hath said: He hath said, which heard the words of God, and knew the knowledge of the most High, which saw the vision of the Almighty, falling into a trance, but having his eyes open: I shall see him, but not now: I shall behold him, but not nigh: there shall come a Star out of Jacob, and a Sceptre shall rise out of Israel, and shall smite the corners of Moab, and destroy all the children of Sheth. And Edom shall be a possession, Seir also shall be a possession for his enemies; and Israel shall do valiantly. Out of Jacob shall come he that shall have dominion, and shall destroy him that remaineth of the city. (Numbers 24:14-19)
The Dake Annotated Reference Bible offers the following analysis of this prophecy on page 177 of the Old Testament: