The construction of the altar marks a significant milestone in the spiritual establishment of the Israelites and the renewal of their covenant with God in the new land. However, the exact timing of this event is a subject of major debate. The primary approach among classical commentators is that the events are not recorded in chronological order. According to this view, the altar was actually built on the very day the Israelites crossed the Jordan River [רש״י, רלב״ג, רד״ק]. They undertook a hurried journey to Mount Ebal, constructed the altar, offered sacrifices, and celebrated. Afterward, they dismantled the stones and returned to sleep in Gilgal [רד״ק]. During this era, before a permanent Tabernacle was established, building such altars was entirely permitted [רד״ק].
Later scholars strongly reject this timeline. They point out the sheer impossibility of an entire nation traveling dozens of miles and completing so much labor in a single day without a clear miracle recorded in the text [מלבי״ם, אברבנאל]. Instead, they argue that the events unfolded in strict chronological order, occurring right after the battle of Ai. Mount Ebal sits in the center of the land, and to reach it, Joshua first had to defeat the inhabitants of Ai and Bethel who stood in his path [ביאור שטיינזלץ, אברבנאל].
Following this chronological approach, the original command given by Moses actually consisted of two distinct stages. The first step was setting up memorial stones in Gilgal immediately after crossing the river, and the second, later step was building the altar at Mount Ebal [מלבי״ם]. Moses intended to take the ancient custom of other nations, who would erect victory stones after a conquest, and redirect that practice toward the worship of God [אברבנאל].
Joshua's decision to build the altar at this specific moment was not random. Following the nation's failure regarding the forbidden spoils during the sin of Achan, which led to their initial defeat at Ai, Joshua recognized an urgent need. He understood that he had to immediately renew the covenant with God and remind the people of their spiritual responsibilities through the ceremony of blessings and curses [אברבנאל].