Answer
As Commander-in-Chief of the Egyptian army, Horemheb played a pivotal role in securing Egypt's borders and maintaining internal stability during the tumultuous reign of Akhenaten and the subsequent Amarna Period. His military prowess and strategic leadership earned him the respect and loyalty of the army, setting the stage for his eventual rise to the throne as the last pharaoh of the 18th Dynasty.