In order to perform a sacrifice, the Jacob and clan had to depart Shechem and travel to Beth-el. We read: "And they journeyed: and the terror of God was upon the cities that were round about them, and they did not pursue after the sons of Jacob." (Gen 35:5) Why was the terror of God upon the cities? What does this mean?
The terror was God's way of protecting Jacob, who had just destroyed the last vestiges of idol worship in his household and was in the process of establishing shrines of God's worship in a hostile environment. The shrines at Shechem and Bethel would later became important centers of God's worship.
The view that Jacob's sons had done right to slaughter the Shechemites must be absolutely rejected. Rather, God protected Jacob's clan in spite of this slaughter. That the murder of the Shechemites was a sin is clear from the declaration of Jacob, who is a prophet in both Christian and Jewish tradition:
Jacob said to Simeon and Levi, “You have brought trouble on me by making me odious to the inhabitants of the land, the Canaanites and the Perizzites; my numbers are few, and if they gather themselves against me and attack me, I shall be destroyed, both I and my household.” (Gen 34)
The Jamieson-Fausset-Brown Bible Commentary is correct when it explains:
There was every reason to apprehend that a storm of indignation would burst from all quarters upon Jacob's family, and that the Canaanite tribes would have formed one united plan of revenge. But a supernatural panic seized them; and thus, for the sake of the "heir of the promise," the protecting shield of Providence was specially held over his family.
If we look for a reason why God would protect Jacob other than that Jacob was the inheritor of the Covenant, we may consider had victoriously prevailed over God's angel and transformed the Cain-like hatred of his brother Esau in Gen. 32-33. Prior to the inexcusable incident of his sons murdering the Shechemites, Jacob had dutifully erected at altar to God there (33:20). Now God directed him to establish another center of worship at Bethel. (Genesis 35:1) Jacob commanded his household:
"Let us go up to Bethel, that I may make an altar there to the God who answered me in the day of my distress and has been with me wherever I have gone.” So they gave to Jacob all the foreign gods that they had and the rings that were in their ears, and Jacob hid them under the oak that was near Shechem. As they journeyed, a terror from God fell upon the cities all around them, so that no one pursued them.
Note that the "terror" falls on the Canaanites immediately after Jacob determines to build the altar and Bethel and buries his family's idols . What Jacob was doing here was a providentially significant task: establishing a place of God's worship in enemy territory after separating his family from any vestiges of idolatry.
The reason for God's terror falling upon the Canaanites at this time was that Jacob was following God's will, establishing His worship in a hostile territory after having risked his life more than once to qualify himself as God's chosen representative. God protected Jacob in spite of his sons' sins at Schechem, in accordance with the biblical precept that a father will not be punished for the sins of his sons (Ezek. 18).
The most obvious reason both that “the terror of God was upon the cities that were round about them” and that “they did not pursue after the sons of Jacob” was surely that the sons of Jacob had recently destroyed the men of Shechem, looted the city, and enslaved their women and children (34:25-29). This is both obvious and correct, but not the whole story.
That the terror of the Canaanites was described, in the voice of Moses, as “the terror of God” can have only one explanation: the author is stating that the slaughter of Shechem was attributed not just to the invading Hebrews but to their God. But furthermore, calling the sentiment "the terror of God" suggests that this reaction was apt, and that God's fierce protection of Jacob and family was indeed something to fear. The phrase might also imply that God himself caused the surrounding Canaanites to hang back in terror.
Note, this means that Jacob had been actually quite mistaken to worry that the Canaanites “shall gather themselves together against me, and slay me; and I shall be destroyed, I and my house.” (34:30) While at the time this might have seemed prudent, in fact it meant Jacob had forgotten the Lord's vow to protect him on his way:
And, behold, I am with thee, and will keep thee in all places whither thou goest, and will bring thee again into this land; for I will not leave thee, until I have done that which I have spoken to thee of. (28:15)
That the Lord did indeed protect Jacob’s clan after the slaughter of Shechem is surely to be part of the explanation why the “cities round about” were in terror.
This might—but probably does not—give some credibility to the notion that in perpetrating the slaughter, the sons of Jacob had indeed done the Lord’s will, even if their action itself was “cursed” and “cruel” (49:7). That is, the Lord might have used Jacob’s sons, entirely unbeknownst to them, as instruments of justice against some wickedness of the Shechemites, or because they sought to intermarry with the Israelites, thus intermixing the chosen people of God with pagan Canaanites.
Note also that this suggests that the events of Gen 35 occurred soon after those of Gen 34, thus linking together the two chapters.