Ben Ali joined the local resistance against French colonial forces and was imprisoned. His expulsion from secondary school was the reason why he never completed his secondary education. He studied at the Sousse Technical Institute but failed to earn a professional certificate and joined the newly formed Tunisian Army in 1958. Nevertheless, after being chosen as one of a group of young officers, he was awarded training in France at Special Inter-service School in Coëtquidan and the Artillery School in Châlons-sur-Marne, and also in the United States at the Senior Intelligence School in Maryland and the School for Anti-Aircraft Field Artillery in Texas. He also held a diploma in electronics engineering from a local university. Returning to Tunisia in 1964, he began his professional military career the same year as a Tunisian staff officer. During his time in military service, he established the Military Security Department and directed its operations for 10 years. He briefly served as military attaché in the Tunisian embassy of Morocco and Spain before being appointed General Director of National Security in 1977.