During the Spanish Civil War, he served in Spain commanding the ground element of the Condor Legion, following the Nazi Germany intervention on the side of the Nationalists led by Francisco Franco. During the 1941 Operation Barbarossa, the invasion of the Soviet Union, Thoma led the 17th Panzer Division and then the 20th Panzer Division, which took part in the Battle of Moscow. In December 1941, Thoma received the Knight's Cross of the Iron Cross. In September 1942 Thoma was transferred to serve with the "Afrika Korps" in North Africa, where he took part in the Second Battle of El Alamein in October 1942.