The Geonim (Shu”t HaGeonim, Sha’are Teshuva, § 43) write that Yehoshua bin Nun composed the prayer of “AlenuLeshabe’ah” when he entered the Land of Israel. When he conquered the city of Jericho he reaffirmed that, unlike the “inhabitants of the land” who worship idols, Bnei Israel serve Hashem only, and included this affirmation in the prayer. Furthermore, it is explained that when Yehoshua circled Jericho seven times, he recited “AlenuLeshabe’ah” each time. As such, Rav Hai Gaon explains that Rabban Yohanan ben Zakai instituted “Alenu Leshabeah” at the end of every prayer. Rabbi Elazar Rokeah (Siddur Tefila, § 132) says it was included in the prayer because of Yehoshua’s stature and because it was said when Bnei Israel finally merited entering the Holy Land. Rabbi Moshe ben Machir (Seder HaYom) stresses that this prayer should be said with intense concentration, and goes on to say that some people had a custom of reciting seven times, just as Yehoshua bin Nun did. The central theme of “AlenuLeshabe’ah” is accepting the yoke of Hashem’s kingship and therefore, even though it occurs at the end of the prayer, oneshould not rush while reciting it.
Summary: Oneshouldensure to recite “AlenuLeshabe’ah” deliberately.