Joshua 5:4

And this is the cause why Joshua did circumcise: All the people that came out of Egypt, that were males, even all the men of war, died in the wilderness by the way, after they came out of Egypt.

The cause given for Joshua's act is that all the males who came out of Egypt, even all the men of war, had died in the wilderness by the way after leaving Egypt. Those whom he circumcised were therefore all the people born in the wilderness, and he circumcised them in obedience to the Lord's command after Israel had reached the promised land.

The renewal took place at Gilgal, which was Israel's first encampment after entering the promised land. It came after the sin at Kadesh and the desert sojourn. It marked a new stage after the wilderness wanderings.

It was done immediately after the Lord stopped the waters of the swollen Jordan before Israel so they passed over on dry land, which melted the hearts of the Amorite and Canaanite kings with fear after Israel had slain two kings of Moab. It was done before Israel kept the Passover in the plains of Jericho. It was also before the appearance of the Angel of the covenant, the Captain of the Lord's host, and before the overthrow of Jericho.

The circumcising of the people was a recognition of God's covenant with Israel. By leading His people over the Jordan on dry land and renewing circumcision, God rolled away the reproach of Egypt. That reproach was the charge of heathen nations against the Lord and His people because Israel had not possessed Canaan soon after leaving Egypt but had wandered long in the wilderness, so that enemies triumphed and lifted themselves proudly against God by declaring He could not lead them into Canaan; with Israel now passed over, they could no longer reproach them.