How did the imperial soldier become the commander of the army after the revolution?


During the prime ministership of Mohammad Mossadegh, he was dismissed from his position on charges of opposing the then prime minister.During the coup d’état on August 28, he was not directly involved in the coup, but after the army was purged of members affiliated with the National Front, he who was Mossadegh was dismissed for opposing him, he was considered one of the officers loyal to the king and was quickly promoted.  He succeeded in obtaining the rank of major general in October 1336, which shows the trust of Mohammad Reza Pahlavi in him until this date.