Then under President Sadat returned him to the service as head of the General Intelligence, then he was promoted to the rank of Lieutenant-General and became Minister of War in 1972.
In the Palestine war, he became the commander of an infantry company in Rafah and Gaza, and that experience qualified him to be the first to establish the nucleus of the Sa’ika Forces.
He was at the rank of (Colonel) and commanded the 3rd Infantry Brigade in Rafah and then Qantara Sharq during the tripartite aggression carried out by Britain, France and Israel against Egypt in the fall of 1956.
In 1960, the old centers of power tried to overthrow him, and he was at the rank of (brigadier) and after 1967, those centers found a justification to overthrow him, and indeed they succeeded in that, but President (Gamal Abdel Nasser) summoned him and handed him the command of the forces east of the Suez Canal, and only three months after The 1967 battles he established the first defensive line and reorganized, trained and armed these forces, and after a short period these forces were able to fight the battle of Ras al-Esh, the Battle of Green Island, and the sinking of the Israeli destroyer (Eilat).
In October 1972, Ali accompanied Prime Minister Aziz Sidqi on a visit to Moscow, and, on his return, stifled a coup attempt against President Sadat.